Class RemoteListener
Listens for incoming connections on the remote server.
public sealed class RemoteListener : IDisposable
- Inheritance
-
RemoteListener
- Implements
- Inherited Members
Properties
ListenEndPoint
Gets the remote endpoint being listened on.
public RemoteEndPoint ListenEndPoint { get; }
Property Value
Remarks
For ListenTcpAsync(string, int, CancellationToken), the type is RemoteIPListenEndPoint.
For ListenUnixAsync(string, CancellationToken), the type is UnixDomainSocketEndPoint.
Methods
AcceptAsync(CancellationToken)
Accepts an incoming connection.
public ValueTask<RemoteConnection> AcceptAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenToken to cancel the operation.
Returns
- ValueTask<RemoteConnection>
A RemoteConnection for the accepted connection, or default when stopped.
Remarks
When Stop() is called, the method returns a default(RemoteConnection).
Dispose()
Stops the listener and releases resources.
public void Dispose()
Stop()
Stops accepting new connections.
public void Stop()