Пример #1
0
 void HandleClient(TcpClient client)
 {
     try {
         Console.WriteLine("Connected!");
         NetworkStream stream      = client.GetStream();
         FileWrapper   fileWrapper = _serializer.ReadFromStream(stream);
         System.IO.File.WriteAllBytes(fileWrapper._fileName, fileWrapper._file);
         Console.WriteLine("File successful copied");
     } catch (Exception e) {
         Console.WriteLine(e.StackTrace);
     }
 }