Class DicomServer<T>
Representation of a DICOM server.
Inherited Members
Namespace: Dicom.Network
Assembly: cs.temp.dll.dll
Syntax
public class DicomServer<T> : IDicomServer<T>, IDicomServer, IDisposable where T : DicomService, IDicomServiceProvider
Type Parameters
Name | Description |
---|---|
T | DICOM service that the server should manage. |
Constructors
DicomServer()
Initializes an instance of the DicomServer<T> class.
Declaration
public DicomServer()
Properties
Exception
Gets the exception that was thrown if the server failed to listen.
Declaration
public Exception Exception { get; protected set; }
Property Value
Type | Description |
---|---|
Exception |
IPAddress
Gets the IP address(es) the server listens to.
Declaration
public virtual string IPAddress { get; protected set; }
Property Value
Type | Description |
---|---|
String |
IsListening
Gets a value indicating whether the server is actively listening for client connections.
Declaration
public bool IsListening { get; protected set; }
Property Value
Type | Description |
---|---|
Boolean |
Logger
Gets the logger used by DicomServer<T>
Declaration
public Logger Logger { get; set; }
Property Value
Type | Description |
---|---|
Logger |
Options
Declaration
public DicomServiceOptions Options { get; protected set; }
Property Value
Type | Description |
---|---|
DicomServiceOptions |
Port
Gets the port to which the server is listening.
Declaration
public virtual int Port { get; protected set; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
CreateScp(INetworkStream)
Create an instance of the DICOM service class.
Declaration
protected virtual T CreateScp(INetworkStream stream)
Parameters
Type | Name | Description |
---|---|---|
INetworkStream | stream | Network stream. |
Returns
Type | Description |
---|---|
T | An instance of the DICOM service class. |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Execute the disposal.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | True if called from Dispose(), false otherwise. |
StartAsync(String, Int32, String, Encoding, DicomServiceOptions, Object)
Starts the DICOM server listening for connections on the specified IP address(es) and port.
Declaration
public virtual Task StartAsync(string ipAddress, int port, string certificateName, Encoding fallbackEncoding, DicomServiceOptions options, object userState)
Parameters
Type | Name | Description |
---|---|---|
String | ipAddress | IP address(es) for the server to listen to. |
Int32 | port | Port to which the servier should be litening. |
String | certificateName | Certificate name for secure connections. |
Encoding | fallbackEncoding | Encoding to apply if no encoding is identified. |
DicomServiceOptions | options | Service options. |
Object | userState | User state to be shared with the connected services. |
Returns
Type | Description |
---|---|
Task | Awaitable |
Stop()
Stop server from further listening.
Declaration
public virtual void Stop()