go-ethereum

skip to content

net Namespace

Last edited on November 25, 2022

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

net_listening

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

ClientMethod invocation
Consolenet.listening
RPC{"method": "net_listening"}

net_peerCount

Returns the number of connected peers.

ClientMethod invocation
Consolenet.peerCount
RPC{"method": "net_peerCount"}

net_version

Returns the devp2p network ID (e.g. 1 for mainnet, 5 for goerli).

ClientMethod invocation
Consolenet.version
RPC{"method": "net_version"}

DOWNLOADS

© 2013–2024. The go-ethereum Authors | Do-not-Track