Documentation
Search…
Net
Description The subcommands can be used to interact with local p2p network connections.
Subcommands
  • Connect — Start a new connection to a peer.
  • Disconnect — Close an existing connection.
  • Status — Status of existing connection.
  • Peers — Status of all existing peers.

Connect

Description

Start a new connection to a peer.

Positional Parameters

  • (string) host— The hostname:port to connect to (required).

Options

No options required for this subcommand.

Command

1
$ cleos net connect <host>
Copied!

Examples

Connect to 'hostname:port'.
1
$ cleos net connect hostname:port
Copied!

Disconnect

Description

Close an existing connection.

Positional Parameters

  • (string) host— The hostname:port to disconnect from (required).

Options

No options required for this subcommand.

Command

1
$ cleos net disconnect <host>
Copied!

Examples

Disconnect from 'hostname:port'.
1
$ cleos net disconnect hostname:port
Copied!

Status

Description

Status of existing connection.

Positional Parameters

  • (string) host— The hostname:port to query status of connection (required).

Options

No options required for this subcommand.

Command

1
$ cleos net status <host>
Copied!

Examples

1
$ cleos net status hostname:port
Copied!
Given, a valid, existing 'hostname:port' parameter the above command returns a JSON response looking similar to the one below:
1
{
2
"peer": "hostname:port",
3
"connecting": false/true,
4
"syncing": false/true,
5
"last_handshake": { // Structure explaining in detail in the Network Peer Protocol documentation section
6
...
7
}
8
}
Copied!

Peers

Description

Status of all existing peers.

Positional Parameters

No parameters required fot this subcommand.

Options

No options required for this subcommand.

Command

1
$ cleos net peers
Copied!
Last modified 1yr ago