Lists the currently connected IoT nodes.
For an overview see page Introduction to eXtremeDB Active Replication Fabric
Prototype
xsql_iot_list();Arguments
none No arguments Description
This function lists the currently connected IoT nodes. For example, on the server this will be a list of connected routers or devices. (Note that, on the other hand,
lists the ways to establish connections for this node, as they are configured in the xSQL config file.xsql_iot_connections()It returns the ResultSet table with the following columns (which matches the iot_params::connections section of the xSQL config file) :
agent_id: the device, router or server idaddress: if the connection has been established through the connect() this is the connect string in the "host:port” format; otherwise nullpeername: the agent's IP address (returned as a string)peerport: the agent's portrx_bytes: bytes receivedtx_bytes: bytes sentrx_zratio: corresponds tomco_iot_connection_stat_t::recv_compression_ratiotx_zratio: corresponds tomco_iot_connection_stat_t::sent_compression_ratioExample
To list all active connections:
XSQL>select * from xsql_iot_list(); agent_id address peername peerport rx_bytes tx_bytes ---------------------------------------------------- 9664 null 127.0.0.1 45354 2260 2346