Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

WebSocketClient.ReceiveAsync Method

Namespace: Rebex.Net
Assembly: Rebex.WebSocket.dll (version 7.0.9147)

ReceiveAsync(ArraySegment<Byte>, CancellationToken)

Receives a message fragment from the server.

Declaration
public async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)
Parameters
Type Name Description
ArraySegment<Byte> buffer

Array segment that receives message fragment data.

CancellationToken cancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
Task<WebSocketReceiveResult>

ReceiveAsync<T>(CancellationToken)

Receives a message of the specified type from the server. Only String, byte array and Object types are currently supported.

Declaration
public async Task<T> ReceiveAsync<T>(CancellationToken cancellationToken)
    where T : class
Parameters
Type Name Description
CancellationToken cancellationToken

Cancellation token to cancel the operation.

Returns
Type Description
Task<T>
Type Parameters
Name Description
T
In This Article
  • ReceiveAsync(ArraySegment<Byte>, CancellationToken)
  • ReceiveAsync<T>(CancellationToken)
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies