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