Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[docs] Update cleos net commands and net plugin description #10360

Merged
merged 6 commits into from
May 18, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 47 additions & 8 deletions docs/02_cleos/03_command-reference/net/disconnect.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,56 @@
## Command
```sh
cleos net disconnect [OPTIONS] host
```

**Where:**
* [OPTIONS] = See **Options** in the [**Command Usage**](command-usage) section below.
* host = The hostname:port to disconnect from.

**Note:** The arguments and options enclosed in square brackets are optional.

## Description
close an existing connection
Close an existing connection to a specified peer. This command allows an operator's node to disconnect from another peer without restarting the node.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agin should this be Use this command to ....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to: "A node operator can use this command..."


## Command Usage
The following information shows the different positionals and options you can use with the `cleos net disconnect` command:

### Positionals
* `host` _TEXT_ REQUIRED - The hostname:port to disconnect from.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.


### Options
* `-h,--help` - Print this help message and exit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full stop at end ... template indicate this list doesn't have them

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 disconnect` command:

* Instruct default local node (listening at default http address `http://127.0.0.1:8888`) to disconnect from peer node listening at p2p address `localhost:9022`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Numbers vs Bullets?

```sh
cleos net disconnect
cleos net disconnect localhost:9022
```
**Output:**
```console
"connection removed"
```

**Output**

* Instruct local node listening at http address `http://127.0.0.1:8001` to disconnect from peer node listening at p2p address `localhost:9022`:
```sh
cleos -u http://127.0.0.1:8001 net disconnect localhost:9022
```
**Output:**
```console
Usage: cleos net disconnect host
"connection removed"
```

Positionals:
host TEXT The hostname:port to disconnect from.
**Note:** If any of the above commands are re-executed, `cleos` returns the following message as expected:
```console
"no known connection for host"
```