🔍

Reagent ws

Reagent for making websockets.

Syntax: reagent[`ws;arg]

Whеre arg is one of:

  • uri: string representing url to connect to
  • tcp/tls reagent to be wrapped to a websocket

ws: reagent[`listener;"0.0.0.0:45101"];
react[{[x:ws]
    spawn[{[sock]
        h: reagent[`ws;sock];
        react[{[x:h] h[x]}]
    };x]
}];