Table of Contents

Class TcpTransport

Namespace
DotBoxD.Transports.Tcp
Assembly
DotBoxD.Transports.Tcp.dll

TCP client transport implementation.

public sealed class TcpTransport : ITransport, IAsyncDisposable
Inheritance
TcpTransport
Implements
Inherited Members
Extension Methods

Constructors

TcpTransport(string, int)

public TcpTransport(string host, int port)

Parameters

host string
port int

Properties

Connection

Gets the active connection (client-side).

public IRpcChannel? Connection { get; }

Property Value

IRpcChannel

FrameReadIdleTimeout

Inter-read idle timeout applied to this connection's in-progress frame reads (slow-loris defense). null uses DefaultFrameReadIdleTimeout; InfiniteTimeSpan disables it. See TcpConnection.

public TimeSpan? FrameReadIdleTimeout { get; init; }

Property Value

TimeSpan?

IsConnected

Gets whether there is an active connection.

public bool IsConnected { get; }

Property Value

bool

Methods

ConnectAsync(CancellationToken)

Establishes a connection (client-side).

public Task ConnectAsync(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.