Add sockopt ZMQ_RCVTIMEO/ZMQ_SNDTIMEO.

- Add doc and tests
- Add options and setup
- Wait using poll/select

Signed-off-by: Fabien Ninoles <fabien@tzone.org>
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
Fabien Ninoles
2011-06-17 12:22:02 +02:00
committed by Martin Sustrik
parent 65d2b70312
commit d7923f08ca
16 changed files with 407 additions and 50 deletions

View File

@@ -41,7 +41,7 @@ namespace zmq
fd_t get_fd ();
void send (const command_t &cmd_);
int recv (command_t *cmd_, bool block_);
int recv (command_t *cmd_, int timeout_);
private:
@@ -52,6 +52,11 @@ namespace zmq
// Platform-dependent function to create a socketpair.
static int make_socketpair (fd_t *r_, fd_t *w_);
// Receives a command with the specific timeout.
// This function is not to be used for non-blocking or inifinitely
// blocking recvs.
int recv_timeout (command_t *cmd_, int timeout_);
// Disable copying of mailbox_t object.
mailbox_t (const mailbox_t&);
const mailbox_t &operator = (const mailbox_t&);