void _client_ServerDiscovered(object sender, NetServerDiscoveredEventArgs e) { if (e.ServerInformation.ServerName == "ZombieMadness!") { _client.Connect(e.ServerInformation.RemoteEndpoint.Address, e.ServerInformation.RemoteEndpoint.Port); } }
/// <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); }