int zmq::stream_engine_t::process_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->process_handshake_command (msg_); if (rc == 0) { if (mechanism->is_handshake_complete ()) mechanism_ready (); if (output_paused) activate_out (); } return rc; }
int zmq::stream_engine_t::next_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->next_handshake_command (msg_); if (rc == 0) { msg_->set_flags (msg_t::command); if (mechanism->is_handshake_complete ()) mechanism_ready (); } return rc; }
int zmq::stream_engine_t::next_handshake_message (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->next_handshake_message (msg_); if (rc == 0) { if (mechanism->is_handshake_complete ()) mechanism_ready (); if (input_paused) activate_in (); } return rc; }
int zmq::stream_engine_t::process_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->process_handshake_command (msg_); if (rc == 0) { if (mechanism->is_handshake_complete ()) mechanism_ready (); if (output_stopped) restart_output (); } // TODO: // if (errno == EPROTO || errno == EACCES) // return ERROR command to client return rc; }
int zmq::stream_engine_t::next_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); const int rc = mechanism->next_handshake_command (msg_); if (rc == 0) { msg_->set_flags (msg_t::command); if (mechanism->is_handshake_complete ()) mechanism_ready (); } // TODO: // if (errno == EPROTO || errno == EACCES) // return ERROR command to client return rc; }
int zmq::stream_engine_t::process_handshake_command (msg_t *msg_) { zmq_assert (_mechanism != NULL); const int rc = _mechanism->process_handshake_command (msg_); if (rc == 0) { if (_mechanism->status () == mechanism_t::ready) mechanism_ready (); else if (_mechanism->status () == mechanism_t::error) { errno = EPROTO; return -1; } if (_output_stopped) restart_output (); } return rc; }
int zmq::stream_engine_t::next_handshake_command (msg_t *msg_) { zmq_assert (mechanism != NULL); if (mechanism->status () == mechanism_t::ready) { mechanism_ready (); return pull_and_encode (msg_); } else if (mechanism->status () == mechanism_t::error) { errno = EPROTO; return -1; } else { const int rc = mechanism->next_handshake_command (msg_); if (rc == 0) msg_->set_flags (msg_t::command); return rc; } }