mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 14:37:36 +01:00
NULL: Implement ERROR handling
NULL mechanism sends ERROR command rather than READY command when ZAP handler rejects the ZAP request (status code != "200"). The body of ERROR command contains the status code as returned by ZAP handler.
This commit is contained in:
@@ -48,14 +48,23 @@ namespace zmq
|
||||
|
||||
session_base_t * const session;
|
||||
|
||||
char status_code [3];
|
||||
|
||||
const std::string peer_address;
|
||||
|
||||
bool ready_command_sent;
|
||||
bool error_command_sent;
|
||||
bool ready_command_received;
|
||||
bool error_command_received;
|
||||
bool zap_connected;
|
||||
bool zap_request_sent;
|
||||
bool zap_reply_received;
|
||||
|
||||
int process_ready_command (
|
||||
const unsigned char *cmd_data, size_t data_size);
|
||||
int process_error_command (
|
||||
const unsigned char *cmd_data, size_t data_size);
|
||||
|
||||
void send_zap_request ();
|
||||
int receive_and_process_zap_reply ();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user