Пример #1
0
        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);
        }
Пример #2
0
 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?"));
 }