Giter VIP home page Giter VIP logo

Comments (5)

tidwall avatar tidwall commented on August 26, 2024

Yes. As long as your application has permission to use the network in the background, such as a VoIP app.

https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html.

from swiftwebsocket.

NikitaCh avatar NikitaCh commented on August 26, 2024

I've enabled all background modes.
Also i've set service of WebSocket instance to .Background.
But as soon as i get to background mode, after about 30 seconds websocket closes the connection.

Thanks,
Nikita.

from swiftwebsocket.

tidwall avatar tidwall commented on August 26, 2024

It's sounds like iOS is still killing the connection when your app goes to the background. SwiftWebSocket does supports long running connections, so there must be a setting that is being missed. You may want to ask on https://forums.developer.apple.com

from swiftwebsocket.

NikitaCh avatar NikitaCh commented on August 26, 2024

Thanks,

I've found post by link: https://forums.developer.apple.com/thread/35065?q=Websocket
Seems like iOS will kill it anyway, it can just give some seconds to finish your networking...

Hope someone there knows how to workaround it somehow.

As this is not your lib problem, i'm closing the issue. Thank you for quick responses.

Thanks,
Nikita.

from swiftwebsocket.

tidwall avatar tidwall commented on August 26, 2024

You're welcome and good luck.

from swiftwebsocket.

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.