Commit 89e53131 authored by Simon Giesecke's avatar Simon Giesecke

Refactored zmq::stream_engine_t::handshake, extracted several sub-methods

parent c3739ff6
This diff is collapsed.
......@@ -93,12 +93,22 @@ class stream_engine_t : public io_object_t, public i_engine
// Function to handle network disconnections.
void error (error_reason_t reason_);
// Receives the greeting message from the peer.
int receive_greeting ();
// Detects the protocol used by the peer.
bool handshake ();
// Receive the greeting from the peer.
int receive_greeting ();
void receive_greeting_versioned ();
typedef bool (stream_engine_t::*handshake_fun_t) ();
static handshake_fun_t select_handshake_fun (bool unversioned,
unsigned char revision);
bool handshake_v1_0_unversioned ();
bool handshake_v1_0 ();
bool handshake_v2_0 ();
bool handshake_v3_0 ();
int routing_id_msg (msg_t *msg_);
int process_routing_id_msg (msg_t *msg_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment