Class TcpServerTransport
Namespace: DotBoxD.Transports.Tcp
Assembly: DotBoxD.Transports.Tcp.dll
TCP server transport implementation.
public sealed class TcpServerTransport : IServerTransport, IAsyncDisposableInheritance
Section titled “Inheritance”Implements
Section titled “Implements”IServerTransport, IAsyncDisposable
Inherited Members
Section titled “Inherited Members”object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object, object), object.ToString()
Constructors
Section titled “Constructors”TcpServerTransport(int)
Section titled “ TcpServerTransport(int)”public TcpServerTransport(int port)Parameters
Section titled “Parameters”port int
TcpServerTransport(IPAddress, int)
Section titled “ TcpServerTransport(IPAddress, int)”public TcpServerTransport(IPAddress address, int port)Parameters
Section titled “Parameters”address IPAddress
port int
TcpServerTransport(string, int)
Section titled “ TcpServerTransport(string, int)”public TcpServerTransport(string address, int port)Parameters
Section titled “Parameters”address string
port int
Properties
Section titled “Properties”FrameReadIdleTimeout
Section titled “ FrameReadIdleTimeout”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; }Property Value
Section titled “Property Value”LocalEndpoint
Section titled “ LocalEndpoint”Gets the bound endpoint after DotBoxD.Transports.Tcp.TcpServerTransport.StartAsync(System.Threading.CancellationToken) succeeds.
public IPEndPoint? LocalEndpoint { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”AcceptAsync(CancellationToken)
Section titled “ AcceptAsync(CancellationToken)”Accepts an incoming connection.
public Task<IRpcChannel> AcceptAsync(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.
StartAsync(CancellationToken)
Section titled “ StartAsync(CancellationToken)”Starts listening for connections.
public Task StartAsync(CancellationToken ct = default)Parameters
Section titled “Parameters”Returns
Section titled “Returns”StopAsync(CancellationToken)
Section titled “ StopAsync(CancellationToken)”Stops listening for connections.
public Task StopAsync(CancellationToken ct = default)