WebSocketReceiveResult.Count Property


Indicates the number of bytes that the WebSocket received.

 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value


Returns Int32.


Count can be 0 in two cases:

  1. The WebSocket received an empty message. In this case the CloseStatus property is None.

  2. The WebSocket received a close message from the remote endpoint. In this case, the CloseStatus property is set to a value other than None.

Applies to