Websockets library for the Good Place.
This library defines
on-connection function, that can be used with Chidi
start function as the last optional argument.
on-connection function expects is not a function, but the table
:read methods, which are called on Websocket connection and
and when new message appears, respectively. When connected
handler table is
enriched with the
:write method so it can write to the connection.
For independent writting to the Websocket, the best way is to save the
handler from the
:connect and call it independently.
Usage is backed by the
ev same as for the Chidi.
Basic example with saving the writers and periodic messaging, can be good overview of the workings.