Ejemplo n.º 1
0
 /// <inheritdoc />
 public Task CloseAsync(CancellationToken ct) =>
 SystemWebSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, string.Empty, ct);
Ejemplo n.º 2
0
 /// <inheritdoc />
 void IDisposable.Dispose() => SystemWebSocket?.Dispose();
Ejemplo n.º 3
0
 /// <inheritdoc />
 public Task SendAsync(byte[] buffer, bool isText, CancellationToken ct)
 => SystemWebSocket.SendAsync(
     new ArraySegment <byte>(buffer),
     isText ? WebSocketMessageType.Text : WebSocketMessageType.Binary,
     true,
     ct);
Ejemplo n.º 4
0
 /// <inheritdoc />
 public Task CloseAsync(Net.CloseStatusCode code, string comment = null, CancellationToken cancellationToken = default) =>
 SystemWebSocket.CloseAsync(MapCloseStatus(code), comment ?? string.Empty, cancellationToken);