HenningM / express-ws

WebSocket endpoints for express applications
BSD 2-Clause "Simplified" License
877 stars 142 forks source link

Close event for sockets #27

Closed AuspeXeu closed 8 years ago

AuspeXeu commented 8 years ago

Is there a close event one can react to? For instance to notify other participants in a chat that someone lost the connection?

HenningM commented 8 years ago

Hi @AuspeXeu,

Yes, the socket type used in this library is this one, meaning that you should be able to subscribe to the 'close' event in the same way that you subscribe to 'message' events.

AuspeXeu commented 8 years ago

@HenningM works like a charm, thanks a lot!