websocket icon indicating copy to clipboard operation
websocket copied to clipboard

Listen to connection states.

Open MAHakeem-MK opened this issue 4 years ago • 2 comments

How to know a connection is closed or not.

MAHakeem-MK avatar Nov 28 '21 13:11 MAHakeem-MK

https://github.com/fasthttp/websocket/blob/4bd282880fdbb4f7c110a2fe7581af15de01e985/_examples/chat/client.go#L65

think you have to listen to the messages and when the close signal comes, then you know what the status is https://pkg.go.dev/github.com/fasthttp/websocket?utm_source=godoc#pkg-constants

ReneWerner87 avatar Dec 28 '21 13:12 ReneWerner87

you can ask in the https://github.com/fasthttp/websocket project, if necessary you can add something there, so that you can access the status faster

ReneWerner87 avatar Dec 28 '21 13:12 ReneWerner87