Interface IProtoDeviceTransport
A protocol backend: the WebSocket implementation lives in its own package, and a test transport can stand in for it. A transport only moves frames; the device classes above it own the conversation.
public interface IProtoDeviceTransport
- Extension Methods
Properties
Name
Gets the transport's name, as configuration and registrations refer to it.
string Name { get; }
Property Value
Methods
ConnectAsync(ProtoExecutionContext, DeviceEndpoint, CancellationToken)
Connects to a device endpoint for a specific test context. The default forwards to ConnectAsync(DeviceEndpoint, CancellationToken); a transport that routes on the test's own state - the in-process TestServer transport - overrides this instead of re-reading ambient host state at connect time, so a connection started on another flow still reaches the application the routing decision was made for.
ValueTask<IProtoDeviceConnection> ConnectAsync(ProtoExecutionContext context, DeviceEndpoint endpoint, CancellationToken cancellationToken = default)
Parameters
contextProtoExecutionContextendpointDeviceEndpointcancellationTokenCancellationToken
Returns
ConnectAsync(DeviceEndpoint, CancellationToken)
Connects to a device endpoint; the connection is opened lazily on first use.
ValueTask<IProtoDeviceConnection> ConnectAsync(DeviceEndpoint endpoint, CancellationToken cancellationToken = default)
Parameters
endpointDeviceEndpointcancellationTokenCancellationToken