GithubHelp home page GithubHelp logo

Comments (4)

DanielCreagh avatar DanielCreagh commented on August 16, 2024 2

i've found the fix for this issue:

socketClient.openSocketWithURLRequest(request: NSURLRequest.initForWebsockets(),
                                          delegate: self,
                                          connectionHeaders: ["Authorization" : "Bearer xyz)", "heart-beat": "0,10000"])

The addition of the heart-beat header (as mentioned in ticket #18) has created consistent traffic over the web socket and hence keeps the socket open.

Thanks for your help, and great work with the library! 🙂🙃🙂

from stompclientlib.

WrathChaos avatar WrathChaos commented on August 16, 2024

Hello @DanielCreagh

From RFC 6455:

1001 indicates that an endpoint is "going away", such as a server
going down or a browser having navigated away from a page.

Resource: Stackoverflow

You should control the stompclient connection when changing the new ViewController or any kinds of stuff. Also, please check your server side part for connection refuse, timeout etc.. If your endpoint connection is goes down, normally your stream connection ends. Moreover, you should handle this issue as well. If you cannot find the solution, please write back :)

One more thing, please try another fully working stream server and let see if you encounter this issue again.
Have fun !

from stompclientlib.

DanielCreagh avatar DanielCreagh commented on August 16, 2024

We have Android and Web clients using same websockets server and neither have this issue. :-(

We are using a singleton instance of a web sockets controller that persists throughout entire execution of app, it isn't connected to any view controllers or anything that can be deallocated etc.

I've tried on device and on simulator on different networks and all demonstrate same behaviour.

Is there a way to configure ping/pong functionality?

from stompclientlib.

WrathChaos avatar WrathChaos commented on August 16, 2024

There is a ping/pong functionality but it still needs some work to do. Please check this issue: #18

from stompclientlib.

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.