Issue #1017: add ZMQ_HANDSHAKE_IVL time limit on connection handshake

This commit is contained in:
Will Strang
2014-05-09 13:54:24 +00:00
parent 1cf12ee612
commit afe5fd87e9
9 changed files with 314 additions and 1 deletions

View File

@@ -68,6 +68,7 @@ namespace zmq
// i_poll_events interface implementation.
void in_event ();
void out_event ();
void timer_event (int id_);
private:
@@ -114,6 +115,8 @@ namespace zmq
size_t add_property (unsigned char *ptr,
const char *name, const void *value, size_t value_len);
void set_handshake_timer();
// Underlying socket.
fd_t s;
@@ -187,6 +190,12 @@ namespace zmq
// True iff the engine doesn't have any message to encode.
bool output_stopped;
// ID of the handshake timer
enum {handshake_timer_id = 0x40};
// True is linger timer is running.
bool has_handshake_timer;
// Socket
zmq::socket_base_t *socket;