mirek / CoreWebSocket

Web Socket Server and Client Library for iOS and OSX. Follows Core Foundation API style.
http://en.wikipedia.org/wiki/WebSockets
142 stars 31 forks source link

Removing client when sockets get closed #10

Closed torpedro closed 5 years ago

torpedro commented 10 years ago

This patch will trigger the "__WebSocketRemoveClient" method, when it is detected that the connection has been dropped and the stream is broken.

michielboekhoff commented 10 years ago

Maybe it's better to use the self->frame->opcode and compare it to the kWebSocketFrameOpCodeClose instead of assuming a closed socket when the message is empty.

michielboekhoff commented 10 years ago

I forked the repo and (more or less) merged the changes you added with some additions.