Class DicomServer<T>
- Namespace
- FellowOakDicom.Network
- Assembly
- fo-dicom.core.dll
Representation of a DICOM server.
public class DicomServer<T> : IDicomServer<T>, IDicomServer, IDisposable where T : DicomService, IDicomServiceProvider
Type Parameters
T
DICOM service that the server should manage.
- Inheritance
-
DicomServer<T>
- Implements
-
IDicomServer<T>
- Inherited Members
- Extension Methods
Constructors
DicomServer(DicomServerDependencies)
Initializes an instance of the DicomServer<T> class.
public DicomServer(DicomServerDependencies dependencies)
Parameters
dependencies
DicomServerDependencies
Properties
Exception
Gets the exception that was thrown if the server failed to listen.
public Exception Exception { get; protected set; }
Property Value
IPAddress
Gets the IP address(es) the server listens to.
public virtual string IPAddress { get; protected set; }
Property Value
IsListening
Gets a value indicating whether the server is actively listening for client connections.
public bool IsListening { get; protected set; }
Property Value
Logger
Gets the logger used by DicomServer<T>
public ILogger Logger { get; set; }
Property Value
Options
Gets the options to control behavior of DicomService base class. Gets the port to which the server is listening.
public DicomServiceOptions Options { get; }
Property Value
Port
Gets the port to which the server is listening.
public virtual int Port { get; protected set; }
Property Value
Registration
Gets the DICOM server registration ticket with the central registry. The registry prevents multiple DICOM servers from being created for the same IP address and port. This registration must be disposed alongside the DICOM server itself.
public DicomServerRegistration Registration { get; set; }
Property Value
ServiceScope
Gets the service scope that will live as long as the DICOM server lives. Must be disposed alongside the DicomServer instance.
public IServiceScope ServiceScope { get; set; }
Property Value
Methods
CreateScp(INetworkStream)
Create an instance of the DICOM service class.
protected virtual T CreateScp(INetworkStream stream)
Parameters
stream
INetworkStreamNetwork stream.
Returns
- T
An instance of the DICOM service class.
Dispose()
public void Dispose()
Dispose(bool)
Execute the disposal.
protected virtual void Dispose(bool disposing)
Parameters
StartAsync(string, int, ITlsAcceptor, Encoding, DicomServiceOptions, object, DicomServerOptions)
Starts the DICOM server listening for connections on the specified IP address(es) and port.
public virtual Task StartAsync(string ipAddress, int port, ITlsAcceptor tlsAcceptor, Encoding fallbackEncoding, DicomServiceOptions serviceOptions, object userState, DicomServerOptions serverOptions)
Parameters
ipAddress
stringIP address(es) for the server to listen to.
port
intPort to which the server should be listening.
tlsAcceptor
ITlsAcceptorHandler to accept secure connections.
fallbackEncoding
EncodingEncoding to apply if no encoding is identified.
serviceOptions
DicomServiceOptionsService options
userState
objectUser state to be shared with the connected services.
serverOptions
DicomServerOptionsServer options
Returns
Stop()
Stop server from further listening.
public virtual void Stop()