Skip to content

Instantly share code, notes, and snippets.

async void BluetoothWatcher_Connected(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementRecievedArgs)
{
_publisher.Stop;
_publisher = null;
_watcher.Stop;
_watcher = null;
BluetoothLEAdvertisementDataSection dataSection = args.Advertisement.DataSections.FirstOrDefault();
if(dataSection == default(BluetoothLEAdvertisementDataSection))
return;
private void MessageRecieved(DatagramSocket sender, DatagramSocketMessageRecievedEventArgs args)
{
var inputStream = args.GetDataStream();
using (var reader = new StreamReader(inputStream.AsStreamForRead()))
{
string data = reader.ReadToEnd();
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.