Interface IProtoDeviceConnection

Namespace
ProtoTest.Devices
Assembly
ProtoTest.Devices.dll

One open connection to a device; frames in, frames out.

public interface IProtoDeviceConnection : IAsyncDisposable
Inherited Members
Extension Methods

Properties

RemoteAddress

Gets the address the connection reached, when the transport can report it.

string? RemoteAddress { get; }

Property Value

string

Methods

ReceiveAsync(CancellationToken)

Receives the next frame, or null when the device closed the connection.

ValueTask<DeviceFrame?> ReceiveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

ValueTask<DeviceFrame?>

SendAsync(DeviceFrame, CancellationToken)

Sends one frame.

ValueTask SendAsync(DeviceFrame frame, CancellationToken cancellationToken = default)

Parameters

frame DeviceFrame
cancellationToken CancellationToken

Returns

ValueTask