Ejemplo n.º 1
0
 public virtual async Task OnMessageSerialized(WSConnection connection, string message)
 {
 }
Ejemplo n.º 2
0
 public async Task SendMessage(WSConnection connection, M message)
 {
     await SendMessage(connection, SerializeMessage(message));
 }
Ejemplo n.º 3
0
 // listening
 public virtual async Task OnMessageDeserialized(WSConnection connection, M message)
 {
 }
Ejemplo n.º 4
0
 // drop connections
 public async Task DropConnection(WSConnection connection, WebSocketCloseStatus closeStatus, string reason)
 {
     await _wsConnectionHolder.RemoveConnection(connection, closeStatus, reason);
 }
Ejemplo n.º 5
0
 // drop connections
 public async Task DropConnection(WSConnection connection,
                                  WebSocketCloseStatus closeStatus = WebSocketCloseStatus.NormalClosure,
                                  string reason = "connection terminated normally")
 {
     await _parentHandler.DropConnection(connection, closeStatus, reason);
 }
Ejemplo n.º 6
0
 public async Task SendMessage(WSConnection connection, string message)
 {
     await _parentHandler.SendMessage(connection, message);
 }
Ejemplo n.º 7
0
 public virtual async Task OnDisconnected(WSConnection connection)
 {
 }