Interface INetworkListener
- Namespace
- FellowOakDicom.Network
- Assembly
- fo-dicom.core.dll
Interface for listening to network stream connections.
public interface INetworkListener
- Extension Methods
Properties
Port
Port property is valid after StartAsync() has been invoked and a listener is bound. Returns -1 otherwise.
int Port { get; }
Property Value
Methods
AcceptTcpClientAsync(bool, int?, int?, ILogger, CancellationToken)
Wait until a TCP client is trying to connect, and return the accepted TCP client.
Task<TcpClient> AcceptTcpClientAsync(bool noDelay, int? receiveBufferSize, int? sendBufferSize, ILogger logger, CancellationToken token)
Parameters
noDelayboolNo delay?
receiveBufferSizeint?The size of the receive buffer of the underlying TCP connection
sendBufferSizeint?The size of the send buffer of the underlying TCP connection
loggerILoggerThe logger
tokenCancellationTokenCancellation token.
Returns
StartAsync()
Start listening.
Task StartAsync()
Returns
Stop()
Stop listening.
void Stop()