Example #1
0
 public async Task WriteMessage(TcpClient client, MessageData message)
 {
     byte[] bytes = message.ToByteArray();
     var stream = client?.GetStream();
     stream?.WriteAsync(bytes, 0, bytes.Length);
 }