public void SendMessage(WireMessage message) { byte[] buffer = message.Encode(); stream.Write(buffer, 0, buffer.Length); }
public async Task SendMessageAsync(WireMessage message) { byte[] buffer = message.Encode(); await stream.WriteAsync(buffer, 0, buffer.Length); }