forked from openethereum/parity-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
JSONRPC net module
Gav Wood edited this page Aug 10, 2016
·
1 revision
Returns the current network protocol version.
none
String
- The current network protocol version
// Request
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' localhost:8545
// Result
{
"id":67,
"jsonrpc": "2.0",
"result": "59"
}
Returns true
if client is actively listening for network connections.
none
Boolean
- true
when listening, otherwise false
.
// Request
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67} localhost:8545
// Result
{
"id":67,
"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 -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}' localhost:8545
// Result
{
"id":74,
"jsonrpc": "2.0",
"result": "0x2" // 2
}
- [With Mist](Using parity with mist)
- For Mining
- [For Private Chains](Private Chains)
- [For PoA Chains](Proof of Authority Chains)
- [Coming from Geth](Importing a chain from Geth)
- Backing-up & Restoring
- Ethereum Classic