\brief Notifies zookeeper that an event of interest has happened.
\param zh the zookeeper handle obtained by a call to \ref zookeeper_init
\param events will be an OR of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags.
\return a result code.
ZOK - success
ZBADARGUMENTS - invalid input parameters
ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE
ZCONNECTIONLOSS - a network error occured while attempting to send request to server
ZSESSIONEXPIRED - connection attempt failed -- the session's expired
ZAUTHFAILED - authentication request failed, e.i. invalid credentials
ZRUNTIMEINCONSISTENCY - a server response came out of order
ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details
ZNOTHING -- not an error; simply indicates that there no more data from the server
to be processed (when called with ZOOKEEPER_READ flag).
\brief Notifies zookeeper that an event of interest has happened.
\param zh the zookeeper handle obtained by a call to \ref zookeeper_init \param events will be an OR of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags. \return a result code. ZOK - success ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZCONNECTIONLOSS - a network error occured while attempting to send request to server ZSESSIONEXPIRED - connection attempt failed -- the session's expired ZAUTHFAILED - authentication request failed, e.i. invalid credentials ZRUNTIMEINCONSISTENCY - a server response came out of order ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details ZNOTHING -- not an error; simply indicates that there no more data from the server to be processed (when called with ZOOKEEPER_READ flag).