Class TcpDeviceTransport

Namespace
ProtoTest.Devices.Tcp
Assembly
ProtoTest.Devices.Tcp.dll

Connects devices out over a raw TCP socket: the device under the test dials the system under test, a gateway or a simulator at tcp://host:port. The client's framer cuts the stream into frames; a client without one reads newline-terminated text.

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

Constructors

TcpDeviceTransport(TcpDeviceOptions)

Creates the transport with the run's TCP options.

public TcpDeviceTransport(TcpDeviceOptions options)

Parameters

options TcpDeviceOptions

Fields

TransportName

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

public const string TransportName = "TCP"

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>