Table of Contents

Class WebSocketOptions

Namespace
System.Net.WebSockets.WebSocketFrame
Assembly
System.Net.WebSockets.dll

Options to use with a ClientWebSocket object.

public class WebSocketOptions
Inheritance
WebSocketOptions
Derived
Inherited Members
Extension Methods

Constructors

WebSocketOptions()

public WebSocketOptions()

Properties

KeepAliveInterval

Gets or sets the WebSocket protocol keep-alive interval.

public TimeSpan KeepAliveInterval { get; set; }

Property Value

TimeSpan

MaxFragmentSize

Gets or sets the maximum allowed byte length of a partial message send by the WebSocket. By default if a message that exceeds the size limit it will be broken up in smaller partial messages Default is 32768 bytes (32kB).

public int MaxFragmentSize { get; set; }

Property Value

int

The maximum allowed byte length of a partial message send by the WebSocket.

MaxReceiveFrameSize

Gets or sets the maximum allowed byte length of messages received by the WebSocket .

public int MaxReceiveFrameSize { get; set; }

Property Value

int

The maximum allowed byte length of messages received by the WebSocket.

ServerTimeout

Gets or sets the WebSocket timeout which specifies how long to wait for a message.

public TimeSpan ServerTimeout { get; set; }

Property Value

TimeSpan

The WebSocket timeout which specifies how long to wait for a message.