pull-ws-server
use pull-ws instead.
create pull stream websockets, servers, and clients.
example
one duplex service you may want to use this with is muxrpc
var ws =var pull =wsvar stream = ws
if the connection fails, the first read from the stream will be an error, otherwise, to get a handle of stream end/error pass a callback to connect.
ws
To run the server over TLS:
var tlsOpts = key: fs cert: fs;ws
To add client-authentication to the server, you can set verifyClient
.
Documentation here.
{ return infosecure == true}ws
use with an http server
if you have an http server that you also need to serve stuff
over, and want to use a single port, use the server
option.
var http =var server = httpws
License
MIT