Dela via


WebSocketOptions Class

Definition

Configuration options for the WebSocketMiddleware.

public ref class WebSocketOptions
public class WebSocketOptions
type WebSocketOptions = class
Public Class WebSocketOptions
Inheritance
WebSocketOptions

Constructors

WebSocketOptions()

Constructs the WebSocketOptions class with default values.

Properties

AllowedOrigins

Set the Origin header values allowed for WebSocket requests to prevent Cross-Site WebSocket Hijacking. By default all Origins are allowed.

KeepAliveInterval

The interval to send keep-alive frames. This is a heart-beat that keeps the connection alive. The default is two minutes.

KeepAliveTimeout

The time to wait for a Pong frame response after sending a Ping frame. If the time is exceeded the websocket will be aborted.

ReceiveBufferSize
Obsolete.

Gets or sets the size of the protocol buffer used to receive and parse frames. The default is 4kb.

ReplaceFeature

Gets or sets if the middleware should replace the WebSocket implementation provided by a component earlier in the stack. This is false by default.

Applies to