zwopple / PocketSocket

Objective-C websocket library for building things that work in realtime on iOS and OS X.
Other
414 stars 129 forks source link

Close method not setting _opened variable to NO #13

Closed desbothma closed 10 years ago

desbothma commented 10 years ago

When calling 'close' method the _opened variable is not set to 'NO', which will cause and exception if trying to reopen a previously closed Socket.

robertjpayne commented 10 years ago

@desbothma This is intentional to reduce code complexity and alert the programmer of developer error.

If the WebSocket protocol allowed re-using a TCP connection or any part of the network stack I'd integrate a change like this but as it stands it's not worth the complexity it allows over destroying and re-creating the web socket.