daltoniam / Starscream

Websockets in swift for iOS and OSX
Apache License 2.0
8.36k stars 1.21k forks source link

How to identify which WebSocket closed #1009

Open doodahdayz opened 8 months ago

doodahdayz commented 8 months ago

If you have an array of WebSocketts created to listen for different servers and you receive a peer disconnected I can find no way to tell which of the WebSockets this message was for... The WebSockets are not "Equatable" in swift and on the didReceive we only get the WebSocketEvent and WebSocketClient passed in... Should not WebSocketClient be assigned a UUID or something to identify it so we can tell which of our WebSockets this event was for? I need to take action for the appropriate WebSocket when the WebSocket disconnects.