Ejemplo n.º 1
0
 public bool SendBytes(byte[] buffer)
 {
     buffer = Protocol.FormatData(buffer);
     try {
         Client.GetStream().BeginWrite(buffer, 0, buffer.Length, SendCallback, null);
         return(true);
     } catch (NullReferenceException) {
         return(false);
     } catch (InvalidOperationException) {
         ProcessDisconnect();
         return(false);
     }
 }