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

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