Class WebSocketDeviceOptions
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
Properties
ConnectTimeout
Gets or sets how long a connection attempt may take. Defaults to 10 seconds.
public TimeSpan ConnectTimeout { get; set; }
Property Value
KeepAliveInterval
Gets or sets the keep-alive interval; null leaves the default.
public TimeSpan? KeepAliveInterval { get; set; }
Property Value
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
ReceiveBufferBytes
Gets or sets the buffer a receive reads into. Defaults to 16 KB.
public int ReceiveBufferBytes { get; set; }
Property Value
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()