Exemplo n.º 1
0
 public void Send(ICanBeSent message)
 {
     try
     {
         if (BinaryWriter != null)
         {
             lock (BinaryWriter)
             {
                 BinaryWriter.Write(message.GetFullMsg());
                 BinaryWriter.Flush();
             }
         }
     }
     catch (Exception e)
     {
         throw new Exception("Cоединение потерено", e);
     }
 }
 public void Send(ICanBeSent message)
 {
     try
     {
     if (BinaryWriter != null)
         lock (BinaryWriter)
         {
             BinaryWriter.Write(message.GetFullMsg());
             BinaryWriter.Flush();
         }
     }
     catch (Exception e)
     {
         throw new Exception("Cоединение потерено", e);
     }
 }