Class WebSocketDeviceTransport

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

Talks to devices over WebSocket - the simulator or gateway in CI, the device's own endpoint in a lab. Text frames stay text, binary frames stay binary; the address comes from the client's resolver.

public sealed class WebSocketDeviceTransport : IProtoDeviceTransport
Inheritance
WebSocketDeviceTransport
Implements
Inherited Members
Extension Methods

Constructors

WebSocketDeviceTransport(WebSocketDeviceOptions)

Creates the transport with the run's WebSocket options.

public WebSocketDeviceTransport(WebSocketDeviceOptions options)

Parameters

options WebSocketDeviceOptions

Fields

TransportName

The transport's name, as registrations and configuration refer to it.

public const string TransportName = "WebSocket"

Field Value

string

Properties

Name

Gets the transport's name, as configuration and registrations refer to it.

public string Name { get; }

Property Value

string

Methods

ConnectAsync(DeviceEndpoint, CancellationToken)

Connects to a device endpoint; the connection is opened lazily on first use.

public ValueTask<IProtoDeviceConnection> ConnectAsync(DeviceEndpoint endpoint, CancellationToken cancellationToken = default)

Parameters

endpoint DeviceEndpoint
cancellationToken CancellationToken

Returns

ValueTask<IProtoDeviceConnection>