Class DicomServer
Support class for managing multiple DICOM server instances.
Inherited Members
Namespace: Dicom.Network
Assembly: cs.temp.dll.dll
Syntax
public static class DicomServer
Remarks
Controls that only one DICOM server per Port is initialized. Current implementation only allows one server per port. It is not possible to initialize multiple servers listening to different network interfaces (for example IPv4 vs. IPv6) via these methods if the port is the same.
Methods
Create<T>(Int32, Object, String, DicomServiceOptions, Encoding, Logger)
Creates a DICOM server object.
Declaration
[Obsolete("Use suitable DicomServer.Create overload instead.")]
public static IDicomServer Create<T>(int port, object userState, string certificateName = null, DicomServiceOptions options = null, Encoding fallbackEncoding = null, Logger logger = null)
where T : DicomService, IDicomServiceProvider
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port to listen to. |
Object | userState | Optional optional parameters. |
String | certificateName | Certificate name for authenticated connections. |
DicomServiceOptions | options | Service options. |
Encoding | fallbackEncoding | Fallback encoding. |
Logger | logger | Logger, if null default logger will be applied. |
Returns
Type | Description |
---|---|
IDicomServer | An instance of DicomServer<T>, that starts listening for connections in the background. |
Type Parameters
Name | Description |
---|---|
T | DICOM service that the server should manage. |
Create<T>(Int32, String, DicomServiceOptions, Encoding, Logger)
Creates a DICOM server object.
Declaration
public static IDicomServer Create<T>(int port, string certificateName = null, DicomServiceOptions options = null, Encoding fallbackEncoding = null, Logger logger = null)
where T : DicomService, IDicomServiceProvider
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port to listen to. |
String | certificateName | Certificate name for authenticated connections. |
DicomServiceOptions | options | Service options. |
Encoding | fallbackEncoding | Fallback encoding. |
Logger | logger | Logger, if null default logger will be applied. |
Returns
Type | Description |
---|---|
IDicomServer | An instance of DicomServer<T>, that starts listening for connections in the background. |
Type Parameters
Name | Description |
---|---|
T | DICOM service that the server should manage. |
Create<T>(String, Int32, Object, String, DicomServiceOptions, Encoding, Logger)
Creates a DICOM server object.
Declaration
public static IDicomServer Create<T>(string ipAddress, int port, object userState = null, string certificateName = null, DicomServiceOptions options = null, Encoding fallbackEncoding = null, Logger logger = null)
where T : DicomService, IDicomServiceProvider
Parameters
Type | Name | Description |
---|---|---|
String | ipAddress | IP address(es) to listen to. |
Int32 | port | Port to listen to. |
Object | userState | Optional optional parameters. |
String | certificateName | Certificate name for authenticated connections. |
DicomServiceOptions | options | Service options. |
Encoding | fallbackEncoding | Fallback encoding. |
Logger | logger | Logger, if null default logger will be applied. |
Returns
Type | Description |
---|---|
IDicomServer | An instance of DicomServer<T>, that starts listening for connections in the background. |
Type Parameters
Name | Description |
---|---|
T | DICOM service that the server should manage. |
Create<T, TServer>(String, Int32, Object, String, DicomServiceOptions, Encoding, Logger)
Creates a DICOM server object.
Declaration
public static IDicomServer Create<T, TServer>(string ipAddress, int port, object userState = null, string certificateName = null, DicomServiceOptions options = null, Encoding fallbackEncoding = null, Logger logger = null)
where T : DicomService, IDicomServiceProvider where TServer : IDicomServer<T>, new()
Parameters
Type | Name | Description |
---|---|---|
String | ipAddress | IP address(es) to listen to. Value applies default, IPv4Any.
|
Int32 | port | Port to listen to. |
Object | userState | Optional optional parameters. |
String | certificateName | Certificate name for authenticated connections. |
DicomServiceOptions | options | Service options. |
Encoding | fallbackEncoding | Fallback encoding. |
Logger | logger | Logger, if null default logger will be applied. |
Returns
Type | Description |
---|---|
IDicomServer | An instance of |
Type Parameters
Name | Description |
---|---|
T | DICOM service that the server should manage. |
TServer | Concrete DICOM server type to be returned. |
GetInstance(Int32)
Gets DICOM server instance registered to port
.
Declaration
public static IDicomServer GetInstance(int port)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which DICOM server is requested. |
Returns
Type | Description |
---|---|
IDicomServer | Registered DICOM server for |
GetInstance(Int32, String)
Gets DICOM server instance registered to port
.
Declaration
public static IDicomServer GetInstance(int port, string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which DICOM server is requested. |
String | ipAddress | IP Address for which the service listener is requested. |
Returns
Type | Description |
---|---|
IDicomServer | Registered DICOM server for |
GetListener(Int32)
Gets service listener for the DICOM server instance registered to port
.
Declaration
public static Task GetListener(int port)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which the service listener is requested. |
Returns
Type | Description |
---|---|
Task | Service listener for the |
GetListener(Int32, String)
Gets service listener for the DICOM server instance registered to port
.
Declaration
public static Task GetListener(int port, string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which the service listener is requested. |
String | ipAddress | IP Address for which the service listener is requested. |
Returns
Type | Description |
---|---|
Task | Service listener for the |
IsListening(Int32)
Gets an indicator of whether a DICOM server is registered and listening on the specified port
.
Declaration
public static bool IsListening(int port)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which listening status is requested. |
Returns
Type | Description |
---|---|
Boolean | True if DICOM server on |
IsListening(Int32, String)
Gets an indicator of whether a DICOM server is registered and listening on the specified port
.
Declaration
public static bool IsListening(int port, string ipAddress)
Parameters
Type | Name | Description |
---|---|---|
Int32 | port | Port number for which listening status is requested. |
String | ipAddress | IP Address for which listening status is requested. |
Returns
Type | Description |
---|---|
Boolean | True if DICOM server on |