Browse Source

docs: added further documentation to the subscribing to events page (#5110)

pull/5116/head
Callum Waters 4 years ago
committed by GitHub
parent
commit
8b460786de
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      docs/app-dev/subscribing-to-events-via-websocket.md

+ 11
- 4
docs/app-dev/subscribing-to-events-via-websocket.md View File

@ -4,14 +4,21 @@ order: 5
# Subscribing to events via Websocket
Tendermint emits different events, to which you can subscribe via
Tendermint emits different events, which you can subscribe to via
[Websocket](https://en.wikipedia.org/wiki/WebSocket). This can be useful
for third-party applications (for analysis) or inspecting state.
for third-party applications (for analysis) or for inspecting state.
[List of events](https://godoc.org/github.com/tendermint/tendermint/types#pkg-constants)
You can subscribe to any of the events above by calling `subscribe` RPC
method via Websocket.
To connect to a node via websocket from the CLI, you can use a tool such as
[wscat](https://github.com/websockets/wscat) and run:
```
wscat ws://127.0.0.1:26657/websocket
```
You can subscribe to any of the events above by calling the `subscribe` RPC
method via Websocket along with a valid query.
```
{


Loading…
Cancel
Save