Amqp.WebSocketTransport.IAsyncTransport C# (CSharp) Method

IAsyncTransport() private method

private IAsyncTransport ( byte buffer, int offset, int count ) : Task
buffer byte
offset int
count int
return Task
        async Task<int> IAsyncTransport.ReceiveAsync(byte[] buffer, int offset, int count)
        {
            if (this.webSocket.State != WebSocketState.Open)
            {
                return 0;
            }

            var result = await this.webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, offset, count), CancellationToken.None);
            if (result.MessageType == WebSocketMessageType.Close)
            {
                return 0;
            }

            return result.Count;
        }

Same methods

WebSocketTransport::IAsyncTransport ( ByteBuffer buffer, IList bufferList, int listSize ) : bool
WebSocketTransport::IAsyncTransport ( Connection connection ) : void