Inheritance: global::System.IDisposable
 public bool IsEqual(DiscoveredSystem remoteSystem)
 {
     return
         (_remoteSystem.GetName() == remoteSystem.GetName()) &&
         (_remoteSystem.GetAddress() == remoteSystem.GetAddress()) &&
         (_remoteSystem.GetRole() == remoteSystem.GetRole());
 }
Beispiel #2
0
 public override void OnRemoteSystemLost(DiscoveredSystem remoteSystem)
 {
     if (this.LostEvent != null)
     {
         this.LostEvent(remoteSystem);
     }
 }
Beispiel #3
0
 public override void OnRemoteSystemDiscovered(DiscoveredSystem remoteSystem)
 {
     if (this.DiscoveredEvent != null)
     {
         this.DiscoveredEvent(remoteSystem);
     }
 }
	    public override void OnRemoteSystemLost(DiscoveredSystem remoteSystem)
        {
            if (this.LostEvent != null)
            {
                this.LostEvent(remoteSystem);
            }
        }
 public override void OnRemoteSystemDiscovered(DiscoveredSystem remoteSystem) 
 {
     if (this.DiscoveredEvent != null)
     {
         this.DiscoveredEvent(remoteSystem);
     }
 }
Beispiel #6
0
 private void OnSystemDiscovered(DiscoveredSystem obj)
 {
     if (obj.GetRole() == SystemRole.SessionDiscoveryServerRole)
     {
         //Found a server. Stop pinging the network and connect
         isTryingToFindServer = false;
         this.ServerAddress   = obj.GetAddress();
         Debug.Log("System Discovered at: " + this.ServerAddress);
         Connect();
         Debug.Log(string.Format("Connected to: {0}:{1}", this.ServerAddress, this.ServerPort));
     }
 }
Beispiel #7
0
 private void OnSystemDiscovered(DiscoveredSystem obj)
 {
     if (obj.GetRole() == SystemRole.SessionDiscoveryServerRole)
     {
         //Found a server. Stop pinging the network and connect
         isTryingToFindServer = false;
         ServerAddress        = obj.GetAddress();
         if (ShowDetailedLogs)
         {
             Debug.Log("Server discovered at: " + ServerAddress);
         }
         Connect();
         if (ShowDetailedLogs)
         {
             Debug.LogFormat("Connected to: {0}:{1}", ServerAddress, ServerPort.ToString());
         }
     }
 }
Beispiel #8
0
        private void OnSystemDiscovered(DiscoveredSystem system)
        {
            if (system.GetRole() != SystemRole.SessionDiscoveryServerRole)
            {
                return;
            }

            // Found a server. Stop pinging the network and connect.
            discoveryClientAdapter.DiscoveredEvent -= OnSystemDiscovered;
            isTryingToFindServer = false;
            ServerAddress        = system.GetAddress();

            if (ShowDetailedLogs)
            {
                Debug.Log("Server discovered at: " + ServerAddress);
            }

            ManagerInit(true);

            if (ShowDetailedLogs)
            {
                Debug.LogFormat("Connected to: {0}:{1}", ServerAddress, ServerPort.ToString());
            }
        }
 private void OnSystemLost(DiscoveredSystem lostSystem)
 {
     for(int i = 0; i < remoteClientList.Items.Count; ++i)
     {
         if ((remoteClientList.Items[i] as RemoteSystemEntry).IsEqual(lostSystem))
         {
             remoteClientList.Items.RemoveAt(i);
             break;
         }
     }
 }
        private void OnSystemDiscovered(DiscoveredSystem newSystem)
        {
            RemoteSystemEntry newEntry = new RemoteSystemEntry();
            newEntry.RemoteSystem = newSystem;

            remoteClientList.Items.Add(newEntry);
        }