Closed fonsp closed 9 months ago
Can you also take a look at https://github.com/JuliaWeb/Hyperscript.jl/issues/43 ? Would be sad to leave the cool package unmaintained 😢
Thank you! : )
1) it's either in setup_connection
or as I do it for Websocket connection in the connection constructor: https://github.com/SimonDanisch/JSServe.jl/blob/master/src/connection/websocket.jl#L13-L15 (it creates a singleton server).
2) You shouldn't really need those. After registering your connection as the default in a certain situation, that connection type will always be used for a new session. So for e.g. Pluto, it's when Pluto is loaded: https://github.com/SimonDanisch/JSServe.jl/blob/master/src/registry.jl#L207-L210.
3) A session encapsulates the connection to a single client. For notebooks we do have subsessions and subconnections, that communicate via one global session and allow to still create a session for each cell (for better cleanup of the used resources).
edit: you do get the Session in setup_connection(session::Session{MyConnection})
, and it gets called whenever a connection is created with your Connection type
Hey! Did I understand the extension system correctly? I made updates to the docs with the things I learned, but please correct the mistakes
Questions:
Session
object?JSServe.FrontendConnection
? To the same WebSocket? Or do you create a newJSServe.FrontendConnection
for each client?JSServe.FrontendConnection
, shouldBase.write(::MyConnection
write to all connected clients?