net_listening - BSC

Example code for the net_listening JSON RPC method. Сomplete guide on how to use net_listening JSON RPC in GetBlock Web3 documentation.

This method returns true if the client is actively listening for network connections on the BNB Smart Chain.

Parameters

  • None

Request Example

cURL
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "net_listening",
    "params": [],
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": true
}

Response Parameters

Parameter
Type
Description

result

boolean

Network listening status

Use Cases

  • Check node connectivity

  • Monitor node health

  • Verify RPC endpoint status

Error Handling

Error Code
Description

-32603

Internal error

SDK Integration

Last updated

Was this helpful?