diff options
Diffstat (limited to 'app/lib/websockets.hoon')
| -rw-r--r-- | app/lib/websockets.hoon | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/lib/websockets.hoon b/app/lib/websockets.hoon index 98ea25b..8e6d45c 100644 --- a/app/lib/websockets.hoon +++ b/app/lib/websockets.hoon @@ -6,6 +6,13 @@ [%message !>(msg)] =/ wsid (scot %ud wid) [%give %fact ~[/websocket-client/[wsid]] cage] + ++ close-ws-client + |= wid=@ + ^- card:agent:gall + =/ =cage + [%disconnect !>(~)] + =/ wsid (scot %ud wid) + [%give %fact ~[/websocket-client/[wsid]] cage] ++ give-ws-payload-server |= [wid=@ event=websocket-event:eyre] @@ -26,6 +33,11 @@ (give-ws-payload-server wid response) == + ++ get-url + |= [wid=@ud =bowl:gall] ^- @t + =/ scry-path=path /(scot %p our.bowl)/ws/(scot %da now.bowl)/id/(scot %ud wid) + =/ conn .^(websocket-connection:iris %ix scry-path) + url.conn ++ check-connected |= [url=@t =bowl:gall] ^- (unit websocket-connection:iris) =/ scry-path=path /(scot %p our.bowl)/ws/(scot %da now.bowl)/url/[url] |
