public void SetupCommunicationWith(TcpClient tcpClient)
        {
            //tcpClient.NoDelay = true;
            Node client = clientNodeFactory.Create(logger, tcpClient);

            clients.Add(client);
            clientCommunicationInitializer.SetUpCommunicationWith(client);
        }
Beispiel #2
0
        private void startListeningForMessagesInANewThread()
        {
            messageListener.OnMessageReceived += onMessageReceived;

            serverNode = clientNodeFactory.Create(logger, tcpClient);
            logger.Write <Client>("Starting listening for messages in a new thread...");
            Task.Factory.StartNew(() =>
            {
                messageListener.ListenForMessages(serverNode);
            });
            logger.Write <Client>("Starting listening for messages in a new thread... started");
        }