1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00

Restructe layout, add README and config page, etc..

Resolves #205

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic 2021-02-16 10:29:41 -07:00
parent 44fa12e358
commit 6bacb945b4
5 changed files with 18 additions and 16 deletions

View File

@ -98,7 +98,7 @@
* [Monitoring](nats-server/configuration/monitoring.md)
* [System Events](nats-server/configuration/sys_accounts/README.md)
* [System Events & Decentralized JWT Tutorial](nats-server/configuration/sys_accounts/sys_accounts.md)
* [Websockets](nats-server/configuration/websockets.md)
* [Websocket](nats-server/configuration/websocket/README.md)
* [Managing A NATS Server](nats-server/nats_admin/README.md)
* [Upgrading a Cluster](nats-server/nats_admin/upgrading_cluster.md)
* [Slow Consumers](nats-server/nats_admin/slow_consumers.md)

View File

@ -117,6 +117,7 @@ authorization: {
| [`cluster`](clustering/cluster_config.md) | Configuration map for [cluster](clustering/). | |
| [`gateway`](gateways/gateway.md#gateway-configuration-block) | Configuration map for [gateway](gateways/). | |
| [`leafnode`](leafnodes/leafnode_conf.md) | Configuration map for a [leafnode](leafnodes/). | |
| [`websocket`](websocket/websocket_conf.md) | Configuration map for [websocket](websocket/). | |
### Connection Timeouts

View File

@ -118,7 +118,7 @@ Therefore this would be considered an invalid configuration:
Note that the decision to make a TLS connection is not based on `wss://` (as opposed to `ws://`) but instead in the presence of a TLS configuration in the `leafnodes{}` or the specific remote configuration block.
To configure Websocket in the remote server, check the [Websocket](../websockets.md) secion.
To configure Websocket in the remote server, check the [Websocket](../websocket/websocket_conf.md) secion.
### `tls` Configuration Block

View File

@ -0,0 +1,12 @@
# Websocket
*Supported since NATS Server version 2.2*
Websocket support can be enabled in the server and may be used alongside the
traditional TCP socket connections. TLS, compression and
Origin Header checking are supported.
**Important**
- NATS Supports only Websocket data frames in Binary, not Text format (https://tools.ietf.org/html/rfc6455#section-5.6). The server will always send in Binary and your clients MUST send in Binary too.
- For writers of client libraries: a Websocket frame is not guaranteed to contain a full NATS protocol (actually will generally not). Any data from a frame must be going through a parser that can handle partial protocols. See the protocol description [here](../../../nats-protocol/nats-protocol/README.md).

View File

@ -1,17 +1,6 @@
# Websocket Support
# Configuration
*Supported since NATS Server version 2.2*
Websocket support can be enabled in the server and may be used alongside the
traditional TCP socket connections. TLS, compression and
Origin Header checking are supported.
**Important**
- NATS Supports only Websocket data frames in Binary, not Text format (https://tools.ietf.org/html/rfc6455#section-5.6). The server will always send in Binary and your clients MUST send in Binary too.
- For writers of client libraries: a Websocket frame is not guaranteed to contain a full NATS protocol (actually will generally not). Any data from a frame must be going through a parser that can handle partial protocols. See the protocol description [here](../../nats-protocol/nats-protocol/README.md).
To enable websocket support in the server, add a `websockets` configuration
To enable websocket support in the server, add a `websocket` configuration
block in the server's configuration file like the following:
```
@ -166,4 +155,4 @@ The possible values are currently:
## Leaf nodes connections
You can configure remote Leaf node connections so that they connect to the Websocket port instead of the Leaf node port.
See [Leafnode](leafnodes/leafnode_conf.md#connecting-using-websocket-protocol) section.
See [Leafnode](../leafnodes/leafnode_conf.md#connecting-using-websocket-protocol) section.