class SocketService

Thread pool service object for socket ports. More...

Definition#include <socket.h>
InheritsThread, Mutex [private]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members


Detailed Description

The SocketService is a thread pool object that is meant to service attached socket ports. Multiple pool objects may be created and multiple socket ports may be attached to the same thread of execution. This allows one to balance threads and sockets they service rather than either using a single thread for all connections or a seperate thread for each connection.

SocketService (int pri = 0)

Create a service thread for attaching socket ports. The thread begins execution with the first attached socket.

Parameters:
priof this thread to run under.

~SocketService ()

Terminate the thread pool and eliminate any attached socket ports.

inline int getCount (void)

Get current reference count. This can be used when selecting the least used service handler from a pool.

Returns: count of active ports.