WebSocket is a great package. It does exactly what it supposes to do. And I found it more user-friendly than similar modules in phyton.
Its documentation, however, is not as complete as other rstudio's packages documentation. There's no way to guess how to call a great part of WebSockets arguments, like protocols or headers. Nevertheless, step by step I made the way to solve all the issues. Except from one: I could not find a way to return to main thread after an error. As vignette states,
The I/O for a WebSocket happens on a separate thread from the main R thread; there is one thread for each WebSocket.
When I get the most common error (the asio.ssl.stream:1(stream truncated) error, code 1006), all the session gets paused, the websocket thread as well as the main thread. Basically, the entire script (or the entire set of instructions on an interactive sessión) stops to do anything. I just can't find a way to return to main thread from onError handler.
Hi,
WebSocket
is a great package. It does exactly what it supposes to do. And I found it more user-friendly than similar modules in phyton.Its documentation, however, is not as complete as other rstudio's packages documentation. There's no way to guess how to call a great part of WebSockets arguments, like
protocols
orheaders
. Nevertheless, step by step I made the way to solve all the issues. Except from one: I could not find a way to return to main thread after an error. As vignette states,When I get the most common error (the
asio.ssl.stream:1(stream truncated)
error, code 1006), all the session gets paused, the websocket thread as well as the main thread. Basically, the entire script (or the entire set of instructions on an interactive sessión) stops to do anything. I just can't find a way to return to main thread fromonError
handler.¿Any idea on how to solve this issue?