Class TcpServerTransport
- Namespace
- DotBoxD.Transports.Tcp
- Assembly
- DotBoxD.Transports.Tcp.dll
TCP server transport implementation.
public sealed class TcpServerTransport : IServerTransport, IAsyncDisposable
- Inheritance
-
TcpServerTransport
- Implements
- Inherited Members
Constructors
TcpServerTransport(int)
public TcpServerTransport(int port)
Parameters
portint
TcpServerTransport(IPAddress, int)
public TcpServerTransport(IPAddress address, int port)
Parameters
TcpServerTransport(string, int)
public TcpServerTransport(string address, int port)
Parameters
Properties
FrameReadIdleTimeout
Inter-read idle timeout applied to accepted connections' in-progress frame reads (slow-loris defense). null uses DefaultFrameReadIdleTimeout; InfiniteTimeSpan disables it. See TcpConnection.
public TimeSpan? FrameReadIdleTimeout { get; init; }
Property Value
LocalEndpoint
Gets the bound endpoint after StartAsync(CancellationToken) succeeds.
public IPEndPoint? LocalEndpoint { get; }
Property Value
Methods
AcceptAsync(CancellationToken)
Accepts an incoming connection.
public Task<IRpcChannel> AcceptAsync(CancellationToken ct = default)
Parameters
Returns
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.
StartAsync(CancellationToken)
Starts listening for connections.
public Task StartAsync(CancellationToken ct = default)
Parameters
Returns
StopAsync(CancellationToken)
Stops listening for connections.
public Task StopAsync(CancellationToken ct = default)