Enumerate the active connections for this replicator.
MCO_RET mco_iot_replicator_enum_agents(
mco_iot_replicator_h repl,
iot_agent_enumerator_t enumerator,
void *context);
repl
enumerator
The iot_agent_enumerator_t callback function with signature:
typedef mco_bool
(*iot_agent_enumerator_t)
(mco_iot_replicator_h repl, iot_connection_h iotc, void *context);
context
The function enumerates the active connections for this replicator.
For each active connection it calls the enumerator, passing the
replicator repl, the current active connection and the
context. If the enumerator callback returns
MCO_NO, this function stops enumeration of the connections (and
returns MCO_S_OK).
MCO_S_OK
MCO_E_IOT_INVALID_HANDLE
repl.
mco_bool print_iot_agent(mco_iot_replicator_h repl, mco_iot_connection_h iotc, void *context)
{
printf("Agent %llu is active\n", mco_iot_conn_get_agent_id(iotc));
return MCO_YES;
}
mco_iot_replicator_enum_agents(repl, &print_iot_agent, 0);