public void Client_ShouldBeAcceptEventFromServer() { const string message = "Message which should be sent"; string receivedMessage = null; client.Bind <string>(1, value => { receivedMessage = value; }); destinationClient.Send(1, message); Thread.Sleep(MillisecondsToWaitForTransfer); Assert.AreEqual(message, receivedMessage); }
private static void Server_ClientConnected(DestinationClient client) { Console.WriteLine($"Someone connected on {client.RemoteEndPoint}"); client.Send((int)ScEventId.SendUserMessage, new UserMessage("Server", "What is your name?")); }