implementation of the peer_iterate function More...
Go to the source code of this file.
Data Structures | |
| struct | GNUNET_CORE_MonitorHandle |
| Handle to a CORE monitoring operation. More... | |
Functions | |
| static void | reconnect (struct GNUNET_CORE_MonitorHandle *mh) |
| Protocol error, reconnect to CORE service and notify client. | |
| static void | handle_mq_error (void *cls, enum GNUNET_MQ_Error error) |
| Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue. | |
| static void | handle_receive_info (void *cls, const struct MonitorNotifyMessage *mon_message) |
| Receive reply from CORE service with information about a peer. | |
| struct GNUNET_CORE_MonitorHandle * | GNUNET_CORE_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CORE_MonitorCallback peer_cb, void *peer_cb_cls) |
| Monitor connectivity and KX status of all peers known to CORE. | |
| void | GNUNET_CORE_monitor_stop (struct GNUNET_CORE_MonitorHandle *mh) |
| Stop monitoring CORE activity. | |
implementation of the peer_iterate function
Definition in file core_api_monitor_peers.c.
|
static |
Protocol error, reconnect to CORE service and notify client.
| mh | monitoring session to reconnect to CORE |
Definition at line 112 of file core_api_monitor_peers.c.
References GNUNET_CADET_Handle::cfg, env, GNUNET_CLIENT_connect(), GNUNET_CORE_KX_CORE_DISCONNECT, GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY, GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS, GNUNET_MQ_destroy(), GNUNET_MQ_handler_end, GNUNET_MQ_hd_fixed_size, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_TIME_UNIT_FOREVER_ABS, handle_mq_error(), handlers, mh, GNUNET_CADET_Handle::mq, and msg.
|
static |
Generic error handler, called with the appropriate error code and the same closure specified at the creation of the message queue.
Not every message queue implementation supports an error handler.
| cls | closure, a struct GNUNET_CORE_MonitorHandle * |
| error | error code |
Definition at line 78 of file core_api_monitor_peers.c.
References mh, and reconnect().
Referenced by reconnect().
|
static |
Receive reply from CORE service with information about a peer.
| cls | our struct GNUNET_CORE_MonitorHandle * |
| mon_message | monitor message |
Definition at line 94 of file core_api_monitor_peers.c.
References GNUNET_TIME_absolute_ntoh(), mh, MonitorNotifyMessage::peer, MonitorNotifyMessage::state, and MonitorNotifyMessage::timeout.