mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +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 plain_server_t : public mechanism_t
|
||||
class plain_server_t : public zap_client_t
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -68,15 +68,6 @@ namespace zmq
|
||||
ready
|
||||
};
|
||||
|
||||
session_base_t * const session;
|
||||
|
||||
const std::string peer_address;
|
||||
|
||||
zap_client_t zap_client;
|
||||
|
||||
// Status code as received from ZAP handler
|
||||
std::string status_code;
|
||||
|
||||
state_t state;
|
||||
|
||||
int produce_welcome (msg_t *msg_) const;
|
||||
@@ -88,7 +79,6 @@ namespace zmq
|
||||
|
||||
int send_zap_request(const std::string &username,
|
||||
const std::string &password);
|
||||
int receive_and_process_zap_reply ();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user