Exemple #1
0
        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;
                }
            }
        }
Exemple #2
0
 private void OnDisable()
 {
     m_messageOrchestrator = null;
     m_hasOtherPlayer      = false;
 }
Exemple #3
0
 public BluethoothMessageService(IMessageOrchestrator orchestrator)
 {
     m_orchestrator = orchestrator;
     m_orchestrator.RegisterMessageService(this);
 }
Exemple #4
0
 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));
 }