mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-07 14:37:36 +01:00
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:
@@ -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 ();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user