Exemple #1
0
        public void StartListening()
        {
            while (true)
            {
                var message = _protocolReader.Receive(_serverSocket);

                //todo
                //instantiate class
            }
        }
Exemple #2
0
        public void Start(IPEndPoint endpoint)
        {
            var serverSocket = new TcpListener(endpoint);

            serverSocket.Start();

            Console.WriteLine(" >> " + "Server Started");

            while (true)
            {
                var socket = _listener.WaitForClientToConnect(serverSocket);

                var message = _protocolReader.Receive(socket);
                _protocolOrchestrator.Process(socket, message);

                _publisher.PublishEventToAll();
            }
        }