> For the complete documentation index, see [llms.txt](https://blackfort.gitbook.io/bxn-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blackfort.gitbook.io/bxn-documentation/json-rpc-server/json-rpc-namespaces/net.md).

# net

The net API provides insight about the networking aspect of the client.

### `net_listening` <a href="#net-listening" id="net-listening"></a>

Returns an indication if the node is listening for network connections.

| CLIENT  | METHOD INVOCATION             |
| ------- | ----------------------------- |
| Console | `net.listening`               |
| RPC     | `{"method": "net_listening"}` |

### `net_peerCount` <a href="#net-peercount" id="net-peercount"></a>

Returns the number of connected peers.

| CLIENT  | METHOD INVOCATION             |
| ------- | ----------------------------- |
| Console | `net.peerCount`               |
| RPC     | `{"method": "net_peerCount"}` |

### `net_version` <a href="#net-version" id="net-version"></a>

Returns the devp2p network ID (e.g. 4999 for mainnet, 4777 for testnet).

| CLIENT  | METHOD INVOCATION           |
| ------- | --------------------------- |
| Console | `net.version`               |
| RPC     | `{"method": "net_version"}` |
