From 8b460786ded92596920050f33c82013c60055147 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Sat, 11 Jul 2020 11:12:14 +0200 Subject: [PATCH] docs: added further documentation to the subscribing to events page (#5110) --- .../subscribing-to-events-via-websocket.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/app-dev/subscribing-to-events-via-websocket.md b/docs/app-dev/subscribing-to-events-via-websocket.md index 6e4f0d207..d3adc8033 100644 --- a/docs/app-dev/subscribing-to-events-via-websocket.md +++ b/docs/app-dev/subscribing-to-events-via-websocket.md @@ -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. ``` {