You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a simple server based on the examples:
constfastWS=require('fast-ws/server');constoptions={};constapp=newfastWS(options)app.ws('/db',ws=>{console.log(`Connected ${ws.remoteAddress}`)ws.on('message',({ data })=>{console.log(`Received: ${data}`);ws.sendMessage(data)})ws.on('echo',({ reply, data })=>{reply(data)})});const[host,port]=['127.0.0.1',8080];app.listen(host,port,()=>{console.log(`Listen on ${host}:${port}`)})
Unfortunately, when I connect using the code below:
constClient=require('fast-ws/client')constoptions={// Ping Interval (not less then server `idleTimeout`)pingInterval: 30000,// Default (ms)// Reply Timeout (Event reply)replyTimeout: 5000,// Default (ms)// parser options (same as server)parserOptions: {},// Others options for package 'ws'};constws=newClient('ws://127.0.0.1:8080/db',options)
I get this output upon connection: Connected 7f00:0001:
IPv6 is disabled, so I have no idea what this value actually is.
Cheers.
The text was updated successfully, but these errors were encountered:
Just a note, the BSON example doesn't work. I installed BSON on both ends, but the server would not parse it using the settings. Might want to clear up the documentation, if I did something wrong here.
The performance of the library is good. Beats the WS for sure. It's also got a nicer api.
I'm running a simple server based on the examples:
Unfortunately, when I connect using the code below:
I get this output upon connection:
Connected 7f00:0001:
IPv6 is disabled, so I have no idea what this value actually is.
Cheers.
The text was updated successfully, but these errors were encountered: