mirror of https://github.com/ethereum/go-ethereum
doc: add missing API methods (#25194)
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>pull/25705/head
parent
3cf48aa454
commit
ab02b0ebe5
@ -0,0 +1,36 @@ |
||||
--- |
||||
title: net Namespace |
||||
sort_key: C |
||||
--- |
||||
|
||||
The `net` API provides insight about the networking aspect of the client. |
||||
|
||||
* TOC |
||||
{:toc} |
||||
|
||||
### net_listening |
||||
|
||||
Returns an indication if the node is listening for network connections. |
||||
|
||||
| Client | Method invocation | |
||||
|:--------|-------------------------------| |
||||
| Console | `net.listening` | |
||||
| RPC | `{"method": "net_listening"}` | |
||||
|
||||
### net_peerCount |
||||
|
||||
Returns the number of connected peers. |
||||
|
||||
| Client | Method invocation | |
||||
|:--------|-------------------------------| |
||||
| Console | `net.peerCount` | |
||||
| RPC | `{"method": "net_peerCount"}` | |
||||
|
||||
### net_version |
||||
|
||||
Returns the devp2p network ID (e.g. 1 for mainnet, 5 for goerli). |
||||
|
||||
| Client | Method invocation | |
||||
|:--------|-----------------------------| |
||||
| Console | `net.version` | |
||||
| RPC | `{"method": "net_version"}` | |
Loading…
Reference in new issue