Class WebSocketDeviceOptions

Namespace
ProtoTest.Devices.WebSocket
Assembly
ProtoTest.Devices.WebSocket.dll

How the WebSocket transport connects and reads. Code sets defaults through the client registration (AddWebSocketClient(..., configure)) or AddInProcessWebSocketDevices(configure); ProtoTest:Devices:WebSocket overrides them per environment.

public sealed class WebSocketDeviceOptions : IProtoConfigurableOptions
Inheritance
WebSocketDeviceOptions
Implements
Inherited Members
Extension Methods

Fields

ConfigurationSectionName

The configuration section this type binds from.

public const string ConfigurationSectionName = "ProtoTest:Devices:WebSocket"

Field Value

string

Properties

ConnectTimeout

Gets or sets how long a connection attempt may take. Defaults to 10 seconds.

public TimeSpan ConnectTimeout { get; set; }

Property Value

TimeSpan

KeepAliveInterval

Gets or sets the keep-alive interval; null leaves the default.

public TimeSpan? KeepAliveInterval { get; set; }

Property Value

TimeSpan?

MaxMessageBytes

Gets or sets the largest message a receive assembles from fragments. Defaults to 4 MiB; a larger message fails with DeviceFrameTooLargeException instead of accumulating until the process runs out of memory. Set to zero to read without a cap.

public long MaxMessageBytes { get; set; }

Property Value

long

ReceiveBufferBytes

Gets or sets the buffer a receive reads into. Defaults to 16 KB.

public int ReceiveBufferBytes { get; set; }

Property Value

int

Methods

Validate()

Validates the resolved options once, after code callbacks and configuration have been applied. A bad value is a configuration error and must throw here rather than fail the first test that happens to use it. The default does nothing.

public void Validate()