Example #1
0
 protected override Task OnMessage(MessageConnection connection, Message message)
 {
     if (message.cmd != testCommand)
     {
         throw new Exception("Unexpected command.");
     }
     // Echo back data
     connection.SendResponse(message.id, testReply, message.data);
     return(Task.CompletedTask);
 }