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; } } }
private void OnDisable() { m_messageOrchestrator = null; m_hasOtherPlayer = false; }
public BluethoothMessageService(IMessageOrchestrator orchestrator) { m_orchestrator = orchestrator; m_orchestrator.RegisterMessageService(this); }
public async Task CreateSession() { m_messageOrchestrator = new BluetoothMessageOrchestrator(BluetoothMessageOrchestrator.Mode.Server); await m_messageOrchestrator.InitializeAsync(); }
public MessagesController(IMessageOrchestrator receptionOrchestrator) { _receptionOrchestrator = receptionOrchestrator ?? throw new ArgumentNullException(nameof(receptionOrchestrator)); }