Library: Net
Package: TCPServer
Header: Poco/Net/TCPServerDispatcher.h
A helper class for TCPServer that dispatches connections to server connection threads.
Direct Base Classes: Poco::Runnable
All Base Classes: Poco::Runnable
Member Functions: beginConnection, currentConnections, currentThreads, duplicate, endConnection, enqueue, maxConcurrentConnections, params, queuedConnections, refusedConnections, release, run, stop, totalConnections
Inherited Functions: run
TCPServerDispatcher(
TCPServerConnectionFactory::Ptr pFactory,
Poco::ThreadPool & threadPool,
TCPServerParams::Ptr pParams
);
Creates the TCPServerDispatcher.
Destroys the TCPServerDispatcher.
int currentConnections() const;
Returns the number of currently handled connections.
int currentThreads() const;
Returns the number of currently used threads.
void duplicate();
Increments the object's reference count.
void enqueue(
const StreamSocket & socket
);
Queues the given socket connection.
int maxConcurrentConnections() const;
Returns the maximum number of concurrently handled connections.
const TCPServerParams & params() const;
Returns a const reference to the TCPServerParam object.
int queuedConnections() const;
Returns the number of queued connections.
int refusedConnections() const;
Returns the number of refused connections.
void release();
Decrements the object's reference count and deletes the object if the count reaches zero.
void run();
Runs the dispatcher.
See also: Poco::Runnable::run()
void stop();
Stops the dispatcher.
int totalConnections() const;
Returns the total number of handled connections.
void beginConnection();
Updates the performance counters.
void endConnection();
Updates the performance counters.