private async void OnFoundAllNearbyDeviceForNow(object sender, EventArgs e) { m_messageOrchestrator = new BluetoothMessageOrchestrator(BluetoothMessageOrchestrator.Mode.Client); await m_messageOrchestrator.InitializeAsync(); foreach (var device in m_deviceLocator.RemoteDevices) { var couldConnect = await m_messageOrchestrator.ConnectToServerAsync(device); if (couldConnect) { break; } } }
public async Task CreateSession() { m_messageOrchestrator = new BluetoothMessageOrchestrator(BluetoothMessageOrchestrator.Mode.Server); await m_messageOrchestrator.InitializeAsync(); }