Comments (5)
Yes. As long as your application has permission to use the network in the background, such as a VoIP app.
from swiftwebsocket.
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.
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.
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.
You're welcome and good luck.
from swiftwebsocket.
Related Issues (20)
- Substring Method Deprecated -- WebSocket.Swift
- the library is very slow
- Abnormal Closure
- How to subscribe and listen to events? HOT 1
- cannot connect with a server HOT 1
- Support Swift 4.2 on CocoaPod HOT 3
- signal SIGPIPE on device
- Swift 5.0 compile error. HOT 9
- Type 'RunLoop' has no member 'Mode' HOT 5
- Compile warning In XCode 10.2.1 with swift 5
- Take Responsibility of this project. HOT 1
- Memory Usage when sending a large message HOT 4
- WebSocketError.needMoreInput
- How do I get the HTTP response headers?
- Doesn't compile on Xcode 11.3.1 HOT 2
- 'NSObject.hashValue' is not overridable; did you mean to override 'NSObject.hash'?
- The "Autobahn Test" link doesn't work...
- Data race
- Send pongs and receive ping events. HOT 1
- Initialization of 'UnsafePointer<UInt8>' results in a dangling pointer
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 swiftwebsocket.