Пример #1
0
 private void HandleConnections()
 {
     while (true)
     {
         var socket  = _serverSocket.Accept();
         var request = _serializationService.DeserializeFromStream(new NetworkStream(socket));
         Task.Run(() => new RequestHandler().Handle(request));
     }
 }
Пример #2
0
        protected override T GetData(Socket socket)
        {
            var xmlSer = new XMLSerializationService <ResponseBase>();

            return((T)xmlSer.DeserializeFromStream(new NetworkStream(socket)));
        }