socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Pass WebSocket closure code to Socket.IO Server on "transport close" reason

Open bryghtlabs-richard opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

We've been working through some connection stability issues with an embedded device with custom Socket.IO client, and I would like to know more information from our Socket.IO 4.7.5 service whenever a Socket.IO client connection is lost due to WebSocket "transport close".

Describe the solution you'd like

For the mainline Socket.IO client-API, the "disconnect" event has an additional "details" parameter that is quite useful. I would like a similar parameter for the server-API. In this "details" parameter, I'd like to be able to retrieve the WebSocket Status Code .

Describe alternatives you've considered I've considered printing a backtrace each time, and trying to work out what happened from that, but it seems quite intrusive and generates a lot of logging.

bryghtlabs-richard avatar Nov 21 '24 17:11 bryghtlabs-richard