Comments (2)
Hi Luke,
You observations are correct.
I'm modeling it after the semantics defined for browser agents:
http://dev.w3.org/html5/websockets
So creating a new SRWebSocket object is the correct thing to do.
Similar to how you don't re-use an NSStream object after it gets
disconnected, you don't reuse a websocket.
I do agree that it probably needs to be clarified a bit (and possibly some
asserts added).
-Mike
Michael Lewis
lolrus.org
[email protected]
On Fri, Feb 17, 2012 at 10:38 AM, Luke Redpath <
[email protected]
wrote:
In my library, I have a connection object that wraps an SRWebSocket object.
When my app loses network activity and causes a disconnection, this
bubbles up using delegation and I encourage people to use Reachability at
this stage to check for network availability and if necessary, wait until
it becomes available before reconnecting.What I'm finding though, is that if the web socket disconnects due to a
network error (to test, I'm simply pulling out my ethernet cable), I'm
unable to re-use it. Callingopen
on it again doesn't appear to do
anything. What I end up doing is creating a brand new socket instead.Is this expected behaviour?
Reply to this email directly or view it on GitHub:
#11
from socketrocket.
This is the connection object in question.
from socketrocket.
Related Issues (20)
- How to use SSL new version
- Seeing the app crash due to crash at com.facebook.SocketRocket.NetworkThread
- SRWebSocket.m give Hang risk warning in Xcode 14 HOT 5
- Memory Leak HOT 1
- Deployment Targets for Cocoapod
- EXC_BREAKPOINT pod '0.6.0' HOT 1
- is 0.6.1 available in pods? HOT 2
- Libraries collision in iOS, React Native and AWS Iot
- Open Error HOT 3
- Cannot connect with subprotocol `graphql-transport-ws`
- How to set or enforce TLS 1.3 version?
- Q: Support L4S udp socket?
- Add SocketRocket.podspec of 0.7.0 version to https://github.com/CocoaPods/Specs.git HOT 3
- Privacy Manifest HOT 3
- 'OSSpinLock' is deprecated: first deprecated in iOS 10.0 - Use os_unfair_lock() from <os/lock.h> instead
- -[AVCaptureSession startRunning] startRunning may not be called between calls to beginConfiguration and commitConfiguration
- Thread Performance Checker Warning HOT 1
- Security issues
- https://www.facebook.com/ghkfyfnvhoh.gmail.com.2024?mibextid=ZbWKwL
- Tiu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socketrocket.