PLAIN: Implement ERROR handling in server

This commit is contained in:
Martin Hurton
2014-05-14 06:23:23 +02:00
parent 8651b55797
commit 57546f4ecb
2 changed files with 51 additions and 16 deletions

View File

@@ -52,6 +52,8 @@ namespace zmq
waiting_for_initiate,
sending_ready,
waiting_for_zap_reply,
sending_error,
error_command_sent,
ready
};
@@ -59,13 +61,14 @@ namespace zmq
const std::string peer_address;
// True iff we are awaiting reply from ZAP reply.
bool expecting_zap_reply;
// Status code as received from ZAP handler
std::string status_code;
state_t state;
int produce_welcome (msg_t *msg_) const;
int produce_ready (msg_t *msg_) const;
int produce_error (msg_t *msg_) const;
int process_hello (msg_t *msg_);
int process_initiate (msg_t *msg_);