Problem: receive_and_process_zap_reply is duplicated in all mechanisms

Solution: extract receive_and_process_zap_reply into zap_client_t and convert zap_client_t into base class of the server mechanism classes
This commit is contained in:
sigiesec
2017-08-16 13:42:24 +02:00
parent d7a3778387
commit 414c6f45b8
11 changed files with 117 additions and 361 deletions

View File

@@ -40,7 +40,7 @@ namespace zmq
class msg_t;
class session_base_t;
class null_mechanism_t : public mechanism_t
class null_mechanism_t : public zap_client_t
{
public:
@@ -57,14 +57,6 @@ namespace zmq
private:
session_base_t * const session;
char status_code [3];
const std::string peer_address;
zap_client_t zap_client;
bool ready_command_sent;
bool error_command_sent;
bool ready_command_received;
@@ -79,7 +71,6 @@ namespace zmq
const unsigned char *cmd_data, size_t data_size);
int send_zap_request ();
int receive_and_process_zap_reply ();
};
}