Returns true if client is actively listening for network connections.
None
Boolean-truewhen listening, otherwisefalse.
Request
curl --data '{"method":"net_listening","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545Response
{
"id": 1,
"jsonrpc": "2.0",
"result": true
}Returns number of peers currenly connected to the client.
None
Quantity- Integer of the number of connected peers
Request
curl --data '{"method":"net_peerCount","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545Response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x2" // 2
}Returns the current network protocol version.
None
String- The current network protocol version
Request
curl --data '{"method":"net_version","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545Response
{
"id": 1,
"jsonrpc": "2.0",
"result": "8995"
}