Update mechanism API so we can check for ERROR status

This commit is contained in:
Martin Hurton
2014-05-06 17:07:50 +02:00
parent 8672f3023a
commit 0be8144176
10 changed files with 43 additions and 28 deletions

View File

@@ -37,6 +37,12 @@ namespace zmq
{
public:
enum status_t {
handshaking,
ready,
error
};
mechanism_t (const options_t &options_);
virtual ~mechanism_t ();
@@ -54,8 +60,8 @@ namespace zmq
// Notifies mechanism about availability of ZAP message.
virtual int zap_msg_available () { return 0; }
// True iff the handshake stage is complete?
virtual bool is_handshake_complete () const = 0;
// Returns the status of this mechanism.
virtual status_t status () const = 0;
void set_peer_identity (const void *id_ptr, size_t id_size);