Beispiel #1
0
 protected virtual Task OnPingAsync(WebSocketConnection connection, ref Message message)
 {
     // by default, respond to a ping with a matching pong
     return(connection.SendAsync(WebSocketsFrame.OpCodes.Pong, ref message)); // right back at you
 }
Beispiel #2
0
 protected virtual Task OnCloseAsync(WebSocketConnection connection, ref Message message)
 {
     // respond to a close in-kind (2-handed close)
     return(connection.SendAsync(WebSocketsFrame.OpCodes.Close, ref message));
 }