Constructing a Server
The only way to construct a runnable server is to use one of the static
make() functions in the two server handle classes, as shown in
Example 20.
Example 20 – Constructing a runnable server
RWRunnableServer myServer;
myServer = RWRunnableServer::make();
RWServerPool pool;
size_t poolSize=4;
pool = RWServerPool::make(poolSize);
Each of these classes also have additional static make() functions that accept other parameters:
Other forms of
make() accept a
size_t value that specifies the maximum capacity of the server’s input queue, effectively limiting the number of unprocessed runnables that are allowed to accumulate within the queue. If the capacity is left unspecified or is specified as zero, the input queue is treated as if it has unlimited capacity.