From 7305d67ff7f9e78b73326ef0e1f68a9613d34205 Mon Sep 17 00:00:00 2001 From: polwex Date: Sat, 1 Nov 2025 03:55:13 +0700 Subject: ws connection to relay fixed, tested --- app/lib/websockets.hoon | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/lib/websockets.hoon') 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] -- cgit v1.2.3