Class WebSocketDeviceTransport
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
optionsWebSocketDeviceOptions
Fields
TransportName
The transport's name, as registrations and configuration refer to it.
public const string TransportName = "WebSocket"
Field Value
Properties
Name
Gets the transport's name, as configuration and registrations refer to it.
public string Name { get; }
Property Value
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
endpointDeviceEndpointcancellationTokenCancellationToken