public void UDPServer_WhenClientConnects_CallbackFunctionCalled() { bool connected = false; udpServer = new UDPServerChannel("127.0.0.1", 0, 32); udpServer.OnClientConnect(c => connected = true); udpClient = new UDPClientChannel("127.0.0.1", udpServer.Port); Utilities.WaitFor(ref connected); Assert.IsTrue(connected); }
public void UDPServer_WhenClientConnects_CallbackFunctionCalled() { bool connected = false; udpServer.Start("127.0.0.1", 0); udpServer.OnClientConnect(c => connected = true); udpClient.Start("127.0.0.1", udpServer.LocalPort); Utilities.WaitFor(ref connected); Assert.IsTrue(connected); }