Open arthurmougin opened 5 years ago
I've the same issue
I was struggling with the same issue/concept. The initial connection where 'socked requested' is logged in your example above IS the open event. The open event emission is abstracted from the underlying ws
implementation.
app.ws('/',function(ws,req){
console.log('socket requested\n');
console.log("new connection.");
ws.send("welcome");
ws.on('message',function (data) {
console.log("message:" ,data);
ws.send(data);
})
....
Unexpected behavior :
On the first connection and after the first message, this code echoed only
while the open event should be emitted between those 2 logs.
Tested on Ubuntu on a Dell and rapsbian on rpi3B+