NNGPool

{NNGPool} Connection pool to implement multithreaded REQ/REP socket server Pool creates the set of NNGPoolWorker instances containing shared state machines and associate its nng context with socket Methods: - constructor -- socket pointer: shoud be nng_socket_type.NNG_SOCKET_REP but may be extended -- callback: receiving message and context - void function(NNGMessage*, void*); -- number of workers -- void* context to pass into callback -- file to forward log messages to - init: initialize workers state machines - shutdown

Constructors

this
this(NNGSocket* isock, nng_pool_callback cb, size_t n, void* icontext, File* ilog)

Creator Param: - socket pointer - callback - number of workers - context pointer - file object to send logs

Members

Functions

init
void init()

Init state machine (switch to initial state)

shutdown
void shutdown()

Stop state machine and wait