Skip to content

Class TcpServerTransport

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

TCP server transport implementation.

public sealed class TcpServerTransport : IServerTransport, IAsyncDisposable

objectTcpServerTransport

IServerTransport, IAsyncDisposable

object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()

public TcpServerTransport(int port)

port int

public TcpServerTransport(IPAddress address, int port)

address IPAddress

port int

public TcpServerTransport(string address, int port)

address string

port int

Idle timeout applied to accepted connections’ 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; }

TimeSpan?

Gets the bound endpoint after DotBoxD.Transports.Tcp.TcpServerTransport.StartAsync(System.Threading.CancellationToken) succeeds.

public IPEndPoint? LocalEndpoint { get; }

IPEndPoint?

Accepts an incoming connection.

public Task<IRpcChannel> AcceptAsync(CancellationToken ct = default)

ct CancellationToken

Task<IRpcChannel>

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

public ValueTask DisposeAsync()

ValueTask

A task that represents the asynchronous dispose operation.

Starts listening for connections.

public Task StartAsync(CancellationToken ct = default)

ct CancellationToken

Task

Stops listening for connections.

public Task StopAsync(CancellationToken ct = default)

ct CancellationToken

Task