Class DesktopNetworkManager
- Namespace
- FellowOakDicom.Network
- Assembly
- fo-dicom.core.dll
.NET implementation of NetworkManager.
public class DesktopNetworkManager : NetworkManager, INetworkManager
- Inheritance
-
DesktopNetworkManager
- Implements
- Inherited Members
- Extension Methods
Fields
Instance
Singleton instance of DesktopNetworkManager.
public static readonly NetworkManager Instance
Field Value
Properties
MachineNameImpl
Implementation of the machine name getter.
protected override string MachineNameImpl { get; }
Property Value
Methods
CreateNetworkListenerImpl(string, int)
Platform-specific implementation to create a network listener object.
protected override INetworkListener CreateNetworkListenerImpl(string ipAddress, int port)
Parameters
Returns
- INetworkListener
Network listener implementation.
CreateNetworkStreamImpl(NetworkStreamCreationOptions)
Platform-specific implementation to create a network stream object.
protected override INetworkStream CreateNetworkStreamImpl(NetworkStreamCreationOptions options)
Parameters
options
NetworkStreamCreationOptionsThe various options that specify how the network stream must be created
Returns
- INetworkStream
Network stream implementation.
CreateNetworkStreamImpl(TcpClient, ITlsAcceptor, bool)
Platform-specific implementation to create a network stream object from an existing TcpClient
protected override INetworkStream CreateNetworkStreamImpl(TcpClient tcpClient, ITlsAcceptor tlsAcceptor, bool ownsTcpClient)
Parameters
tcpClient
TcpClientThe inbound, connected TCP client
tlsAcceptor
ITlsAcceptorThe TLS acceptor responsible for setting up TLS
ownsTcpClient
boolWhether or not the network stream owns the TCP client (i.e. the TCP client be disposed when the network stream is disposed)
Returns
- INetworkStream
Network stream implementation.
IsSocketExceptionImpl(Exception, out int, out string)
Platform-specific implementation to check whether specified exception
represents a socket exception.
protected override bool IsSocketExceptionImpl(Exception exception, out int errorCode, out string errorDescriptor)
Parameters
exception
ExceptionException to validate.
errorCode
intError code, valid if
exception
is socket exception.errorDescriptor
stringError descriptor, valid if
exception
is socket exception.
Returns
- bool
True if
exception
is socket exception, false otherwise.
TryGetNetworkIdentifierImpl(out DicomUID)
Platform-specific implementation to attempt to obtain a unique network identifier, e.g. based on a MAC address.
protected override bool TryGetNetworkIdentifierImpl(out DicomUID identifier)
Parameters
identifier
DicomUIDUnique network identifier, if found.
Returns
- bool
True if network identifier could be obtained, false otherwise.