net_peerCount
Returns number of peers connected to node
web3.net.peerCount
Parameters
none
Returns
The number of other Ethereum nodes connected to the node.
Example
var peerCount = web3.net.peerCount;
console.log(peerCount);
> 5
Last updated