Table of Contents

Class NetworkManager

Namespace
FellowOakDicom.Network
Assembly
fo-dicom.core.dll

Abstract manager class for network operations.

public abstract class NetworkManager : INetworkManager
Inheritance
NetworkManager
Implements
Derived
Inherited Members
Extension Methods

Fields

IPv4Any

String representation of the "Any" IPv4 address, i.e. specifying the listener to listen to all applicable IPv4 addresses.

public const string IPv4Any = "0.0.0.0"

Field Value

string

IPv4Loopback

String representation of the "Loopback" IPv4 address, i.e. specifying the listener to listen to the local IPv4 host.

public const string IPv4Loopback = "127.0.0.1"

Field Value

string

IPv6Any

String representation of the "Any" IPv6 address, i.e. specifying the listener to listen to all applicable IPv6 addresses.

public const string IPv6Any = "::"

Field Value

string

IPv6Loopback

String representation of the "Loopback" IPv6 address, i.e. specifying the listener to listen to the local IPv6 host.

public const string IPv6Loopback = "::1"

Field Value

string

Properties

MachineNameImpl

Implementation of the machine name getter.

protected abstract string MachineNameImpl { get; }

Property Value

string

Methods

CreateNetworkListenerImpl(string, int)

Platform-specific implementation to create a network listener object.

protected abstract INetworkListener CreateNetworkListenerImpl(string ipAddress, int port)

Parameters

ipAddress string

IP address(es) to listen to.

port int

Network port to listen to.

Returns

INetworkListener

Network listener implementation.

CreateNetworkStream(TcpClient, ITlsAcceptor, bool)

Platform-specific implementation to create a network stream object from an existing TcpClient

public INetworkStream CreateNetworkStream(TcpClient tcpClient, ITlsAcceptor tlsAcceptor, bool ownsTcpClient)

Parameters

tcpClient TcpClient

The inbound, connected TCP client

tlsAcceptor ITlsAcceptor

The TLS acceptor responsible for setting up TLS

ownsTcpClient bool

Whether 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.

CreateNetworkStreamImpl(NetworkStreamCreationOptions)

Platform-specific implementation to create a network stream object.

protected abstract INetworkStream CreateNetworkStreamImpl(NetworkStreamCreationOptions networkStreamCreationOptions)

Parameters

networkStreamCreationOptions NetworkStreamCreationOptions

Returns

INetworkStream

Network stream implementation.

CreateNetworkStreamImpl(TcpClient, ITlsAcceptor, bool)

Platform-specific implementation to create a network stream object from an existing TcpClient

protected abstract INetworkStream CreateNetworkStreamImpl(TcpClient tcpClient, ITlsAcceptor tlsAcceptor, bool ownsTcpClient)

Parameters

tcpClient TcpClient

The inbound, connected TCP client

tlsAcceptor ITlsAcceptor

The TLS acceptor responsible for setting up TLS

ownsTcpClient bool

Whether 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 abstract bool IsSocketExceptionImpl(Exception exception, out int errorCode, out string errorDescriptor)

Parameters

exception Exception

Exception to validate.

errorCode int

Error code, valid if exception is socket exception.

errorDescriptor string

Error 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 abstract bool TryGetNetworkIdentifierImpl(out DicomUID identifier)

Parameters

identifier DicomUID

Unique network identifier, if found.

Returns

bool

True if network identifier could be obtained, false otherwise.