Class TcpTransport
Namespace: DotBoxD.Transports.Tcp
Assembly: DotBoxD.Transports.Tcp.dll
TCP client transport implementation.
public sealed class TcpTransport : ITransport, IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()
Extension Methods
Section titled “Extension Methods”RpcTransportExtensions.ConnectPeerAsync(ITransport, ISerializer, RpcPeerOptions?, CancellationToken), RpcTransportExtensions.ConnectPeerAsync(ITransport, ISerializer, Action<RpcPeer>, RpcPeerOptions?, CancellationToken)
Constructors
Section titled “Constructors”TcpTransport(string, int)
Section titled “ TcpTransport(string, int)”public TcpTransport(string host, int port)Parameters
Section titled “Parameters”host string
port int
Properties
Section titled “Properties”Connection
Section titled “ Connection”Gets the active connection (client-side).
public IRpcChannel? Connection { get; }Property Value
Section titled “Property Value”FrameReadIdleTimeout
Section titled “ FrameReadIdleTimeout”Idle timeout applied to this connection’s frame reads (slow-loris
defense). null uses DotBoxD.Transports.Tcp.TcpConnection.DefaultFrameReadIdleTimeout;
System.Threading.Timeout.InfiniteTimeSpan disables it. See DotBoxD.Transports.Tcp.TcpConnection.
public TimeSpan? FrameReadIdleTimeout { get; init; }Property Value
Section titled “Property Value”IsConnected
Section titled “ IsConnected”Gets whether there is an active connection.
public bool IsConnected { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ConnectAsync(CancellationToken)
Section titled “ ConnectAsync(CancellationToken)”Establishes a connection (client-side).
public Task ConnectAsync(CancellationToken ct = default)Parameters
Section titled “Parameters”Returns
Section titled “Returns”DisposeAsync()
Section titled “ DisposeAsync()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
public ValueTask DisposeAsync()Returns
Section titled “Returns”A task that represents the asynchronous dispose operation.