Package com.klaytn.caver.rpc
Class Net
- java.lang.Object
-
- com.klaytn.caver.rpc.Net
-
public class Net extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.web3j.protocol.Web3jService
web3jService
-
Constructor Summary
Constructors Constructor Description Net(org.web3j.protocol.Web3jService web3jService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.web3j.protocol.core.Request<?,Bytes>
getNetworkID()
Returns the network identifier (network ID).org.web3j.protocol.core.Request<?,Quantity>
getPeerCount()
Returns the number of peers currently connected to the client.org.web3j.protocol.core.Request<?,KlayPeerCount>
getPeerCountByType()
Returns the number of connected nodes by type and the total number of connected nodes.org.web3j.protocol.core.Request<?,Quantity>
getVersion()
Returns the current klaytn protocol version.org.web3j.protocol.core.Request<?,Boolean>
isListening()
Returns true if the client is actively listening for network connections.
-
-
-
Method Detail
-
getNetworkID
public org.web3j.protocol.core.Request<?,Bytes> getNetworkID()
Returns the network identifier (network ID).- Returns:
- Bytes - The integer of the network identifier.
-
isListening
public org.web3j.protocol.core.Request<?,Boolean> isListening()
Returns true if the client is actively listening for network connections.- Returns:
- Boolean - true when listening, otherwise false
-
getPeerCount
public org.web3j.protocol.core.Request<?,Quantity> getPeerCount()
Returns the number of peers currently connected to the client.- Returns:
- Quantity - Integer of the number of connected peers.
-
getPeerCountByType
public org.web3j.protocol.core.Request<?,KlayPeerCount> getPeerCountByType()
Returns the number of connected nodes by type and the total number of connected nodes.- Returns:
- KlayPeerCount - The number of connected peers by type as well as the total number of connected peers.
-
getVersion
public org.web3j.protocol.core.Request<?,Quantity> getVersion()
Returns the current klaytn protocol version.- Returns:
- Quantity - Integer of the current klaytn protocol version.
-
-