Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jonathonmcmurray/ws.q
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathonmcmurray committed Apr 22, 2021
2 parents ecb6040 + e5a177a commit f528bad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ws-client/ws.q
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,13 @@ open0:{[x;y;v]

open:{neg first open0[x;y;.ws.VERBOSE]} //return neg handle for messaging

.ws.close:{[h]
h:abs h;
if[all(h in key .ws.w;h in key .z.W);hclose h]; //close handle if h is found both in .ws.w and .z.W (all opened handles)
.ws.w:.ws.w _ h; //remove h from .ws.w
.z.wc h; //remove h from .ws.servers
}

.ws.closea:{.ws.close each (0!.ws.w)[`h]} //close all opened websockets

\d .

0 comments on commit f528bad

Please sign in to comment.