示例#1
0
 void _client_ServerDiscovered(object sender, NetServerDiscoveredEventArgs e)
 {
     if (e.ServerInformation.ServerName == "ZombieMadness!")
     {
         _client.Connect(e.ServerInformation.RemoteEndpoint.Address, e.ServerInformation.RemoteEndpoint.Port);
     }
 }
示例#2
0
 /// <summary>
 /// Handles the "ServerDiscovered" event for the client by appending the server information to the queue.
 /// </summary>
 private void SpiderNet_ServerDiscoveredHandler(object sender, NetServerDiscoveredEventArgs e)
 {
     Console.Out.WriteLine(e.ToString());
     localSessionQueue.Enqueue(e.ServerInformation);
 }