-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[docs] Update cleos net commands and net plugin description #10360
Changes from 2 commits
b3d9e74
7895e3f
cc60a63
d47b914
6de4f79
b04ee3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,56 @@ | ||
## Command | ||
```sh | ||
cleos net connect [OPTIONS] host | ||
``` | ||
|
||
**Where:** | ||
* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below. | ||
* host = The hostname:port to connect to. | ||
|
||
**Note:** The arguments and options enclosed in square brackets are optional. | ||
|
||
## Description | ||
Start a new connection to a peer | ||
Start a new connection to a specified peer. This command allows an operator's node to connect to another peer without restarting the node. | ||
|
||
## Command Usage | ||
The following information shows the different positionals and options you can use with the `cleos net connect` command: | ||
|
||
### Positionals | ||
* `host` _TEXT_ REQUIRED - The hostname:port to connect to. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Full stop at end ... template indicate this list doesn't have them There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
|
||
### Options | ||
* `-h,--help` - Print this help message and exit. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Full stop at end ... template indicate this list doesn't have them There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed. |
||
|
||
## Requirements | ||
Make sure you meet the following requirements: | ||
|
||
**Command** | ||
* Install the currently supported version of `cleos`. | ||
[[info | Note]] | ||
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools. | ||
* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded. | ||
|
||
## Examples | ||
The following examples demonstrate how to use the `cleos net connect` command: | ||
|
||
* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to connect to peer node listening at p2p address `localhost:9022`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the examples be numbered rather than bulleted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought bullets were used when sequence doesn't matter - the case in point. If we want to identify the examples, then I think we should create explicit subtitles; e.g. Example 1, Example 2, etc. because numbered bullets in a list are used for a different purpose. @bobgt ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good scenario. If we use numbered list here, it may give a quick illusion that it's a procedure. So numbered list won't be a good fit. If we go with bullets, it's not inappropriate but the 2 examples are not standing out clearly. I would go with the explicit subtitles, L3 Headers: Example 1Instruct default local node (listening at default http address cleos net connect localhost:9022 Output: "added connection" Example 2I will consult with Virginia and update the Command Reference template. Thanks for flagging this! |
||
```sh | ||
cleos net connect | ||
cleos net connect localhost:9022 | ||
``` | ||
**Output:** | ||
```console | ||
"added connection" | ||
``` | ||
|
||
**Output** | ||
|
||
* Instruct local node listening at http address `http://127.0.0.1:8001` to connect to peer node listening at p2p address `localhost:9022`: | ||
```sh | ||
cleos -u http://127.0.0.1:8001 net connect localhost:9022 | ||
``` | ||
**Output:** | ||
```console | ||
Usage: cleos net connect host | ||
"added connection" | ||
``` | ||
|
||
Positionals: | ||
host TEXT The hostname:port to connect to. | ||
**Note:** If any of the above commands are re-executed, `cleos` returns the following message as expected: | ||
```console | ||
"already connected" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
passive?
This command allows an operator's node to connect to another peer without restarting the node.
to
Use this command to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. Use this command to connect to a peer without restarting the node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken, but I want to highlight the fact that this command is particularly useful for node operators. "Use this command" for a generic user won't stress this fact. Therefore, to achieve this and make it active voice I changed to: "A node operator can use this command..."