Skip to content

Commit d9e041b

Browse files
committed
DOC: documentation on web sockets
1 parent a801440 commit d9e041b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/source/control_re_manager.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,3 +412,35 @@ and generate the text output locally without repeatedly reloading the text
412412
buffer with each buffer update as in the case of ``/console_output`` API. ::
413413

414414
http GET http://localhost:60610/api/console_output_update last_msg_uid=<last-message-uid>
415+
416+
417+
WebSockets for streaming System Info and Console Output
418+
-------------------------------------------------------
419+
420+
The following WebSockets are currently implemented:
421+
422+
- ``/console_output/ws`` - streaming of console output;
423+
424+
- ``/info/ws`` - streaming of system info messages from RE Manager;
425+
426+
- ``/status/ws`` - streaming of status messages from RE Manager. Status messages are sent each
427+
time status is updated at RE Manager or at least once per second. Check status UID (part of
428+
RE Manager status) to detect changes in status.
429+
430+
For example, the console output stream may be received by connecting to the socket with
431+
``ws://localhost:60610/api/console_output/ws`` URI.
432+
433+
Currently ``/info/ws`` and ``/status/ws`` sockets are streaming the same sequence of RE Manager
434+
status messages. Additional messages may be added to the system info stream in the future.
435+
436+
Message format for console output messages::
437+
438+
{"time": <timestamp>, "msg": <output-text>}
439+
440+
Message format for system info messages::
441+
442+
{"time": <timestamp>, "msg": {<msg-class>: <msg-content>}}
443+
444+
For example, the following format is used for status messages::
445+
446+
{"time": <timestamp>, "msg": {"status": {<RE-Manager-status>}}}

0 commit comments

Comments
 (0)