# xsql_iot_connections

> 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, ``xsql_iot_connections()`` lists the ways to establish connections for this node, as they are configured in the xSQL config file.

> > 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 id
> > - `address` : if the connection has been established through the connect() this is the connect string in the "host:port” format; otherwise null
> > - `peername` : the agent's IP address (returned as a string)
> > - `peerport` : the agent's port
> > - `rx_bytes` : bytes received
> > - `tx_bytes` : bytes sent
> > - `rx_zratio` : corresponds to `mco_iot_connection_stat_t::recv_compression_ratio`
> > - `tx_zratio` : corresponds to `mco_iot_connection_stat_t::sent_compression_ratio`

> > > ## Example

> > > > 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