Giter Site home page Giter Site logo

Comments (2)

mikelikespie avatar mikelikespie commented on August 16, 2024 1

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. Calling open 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.

lukeredpath avatar lukeredpath commented on August 16, 2024

This is the connection object in question.

from socketrocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.