Loading...
Searching...
No Matches
DcmSCPPool< SCP, SCPPool, BaseSCPWorker > Class Template Reference

Implementation of DICOM SCP server pool. More...

Inheritance diagram for DcmSCPPool< SCP, SCPPool, BaseSCPWorker >:

## Classes

struct | SCPWorker
| Helper class to use any class as an SCPWorker as long as it is a model of the SCP Thread Concept. More...

## Public Member Functions

| DcmSCPPool ()
| Default construct a DcmSCPPool object.
Public Member Functions inherited from DcmBaseSCPPool
virtual | ~DcmBaseSCPPool ()
| Virtual destructor, frees internal memory.
virtual void | setMaxThreads (const Uint16 maxWorkers)
| Set the number of maximum permitted connections, i.e. threads/workers.
virtual Uint16 | getMaxThreads ()
| Get number of maximum permitted connections, i.e. threads/workers.
virtual size_t | numThreads (const OFBool onlyBusy)
| Get number of currently active connections.
virtual OFCondition | listen ()
| Listen for incoming association requests.
virtual DcmSCPConfig & | getConfig ()
| Return handle to the SCP configuration that is used to configure how to handle incoming associations.
virtual void | stopAfterCurrentAssociations ()
| If enabled, the pool will return from listening for incoming requests as soon as the last worker is idle, i.e. no worker is handling a DICOM association any more.

## Private Member Functions

virtual BaseSCPWorker * | createSCPWorker ()
| Create a worker to be used for handling a request.

## Additional Inherited Members

Protected Member Functions inherited from DcmBaseSCPPool
| DcmBaseSCPPool ()
| Constructor.
OFCondition | runAssociation (T_ASC_Association *assoc, const DcmSharedSCPConfig &sharedConfig)
| Try to find worker to run the association.
virtual void | dropAndDestroyAssociation (T_ASC_Association *assoc)
| Drops association and clears internal structures to free memory.
void | rejectAssociation (T_ASC_Association *assoc, const T_ASC_RejectParametersReason &reason)
| Reject association using the given reason, e.g. because maximum number of connections is currently already served.
void | notifyWorkerDone (DcmBaseSCPWorker *thread, OFCondition result)
| Used by thread to tell pool it has terminated.
virtual OFCondition | initializeNetwork (T_ASC_Network **network)
| Initialize network, i.e.

## Detailed Description

template<typename SCP = DcmThreadSCP, typename SCPPool = DcmBaseSCPPool, typename BaseSCPWorker = OFTypename SCPPool::DcmBaseSCPWorker>
class DcmSCPPool< SCP, SCPPool, BaseSCPWorker >

Implementation of DICOM SCP server pool.

The pool waits for incoming TCP/IP connection requests, accepts them on TCP/IP level and hands the connection to a worker thread. The maximum number of worker threads, i.e. simultaneous connections, is configurable. The default is 5. At the moment, if no free worker slots are available, an incoming request is rejected with the error "local limit exceeded", i.e. those requests are not queued. This behaviour might change in the future.

Template Parameters

  SCP | the service class provider to be instantiated for each request, should follow the SCP Thread Concept.
  SCPPool | the base SCP pool class to use. Use this parameter if you want to use a different implementation (probably derived from DcmBaseSCPPool) as base class for implementing the SCP pool.
  BaseSCPWorker | the base SCP worker class to use. Use this parameter if you want to use a different implementation of the SCP worker, e.g. for using processes instead of threads or sharing a single thread for multiple workers.

## Member Function Documentation

## createSCPWorker()

template<typename SCP = DcmThreadSCP, typename SCPPool = DcmBaseSCPPool, typename BaseSCPWorker = OFTypename SCPPool::DcmBaseSCPWorker>

virtual BaseSCPWorker * DcmSCPPool< SCP, SCPPool, BaseSCPWorker >::createSCPWorker | ( |  | ) |

inline private virtual

Create a worker to be used for handling a request.

Returns
  a pointer to a newly created SCP worker.

Implements DcmBaseSCPPool.

The documentation for this class was generated from the following file:

- dcmnet/include/dcmtk/dcmnet/scppool.h

Generated on for DCMTK Version 3.7.0 by Doxygen 1.15.0