Comments (5)
I did a test, when i push the home button of iPhone, the callback mqttDidReceivePong(mqtt: CocoaMQTT) {}
can still be executed, and the socket has not been closed.
You could download my latest test code from https://github.com/CrazyWisdom/CocoaMQTT, then run the Example project in it, and click the "Connect" button in the navigation bar.
from cocoamqtt.
I tested your example, the ping pong log print only when the app is on foreground. It likes a reconnect, it prints many logs after i wait a long time at the background state.
from cocoamqtt.
I found a file:https://github.com/Guou/Demo-mqtt-push/blob/master/MQTTKit/MQTTKit/MQTTKit.m
A line like "CFReadStreamSetProperty(readStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);" is about set socket property to VOIP
from cocoamqtt.
Okay,I will have a look.
from cocoamqtt.
@qifx , you could enable VOIP mode use: mqtt.backgroundOnSocket = true
#40
from cocoamqtt.
Related Issues (20)
- publish message with 15MB of image Base64String failed. HOT 1
- TLS Support with Trusted Server Certificate HOT 5
- How can i set message expire interval?
- Retained message issue HOT 1
- "Index out of range" - error occurs when passing user properties to message
- Deployment target out of range HOT 4
- Priority Inversion Crash HOT 2
- CocoaMQTTWebSocket.swift:459:1 Type 'CocoaMQTTWebSocket.StarscreamConnection' does not conform to protocol 'WebSocketDelegate' HOT 4
- Connection issue
- Privacy Manifest HOT 3
- connecting at the same time with mqtt3 and mqtt5 to the same broker does not work HOT 4
- No userProperty info back to client in publish ack message. HOT 1
- Can't Connect CocoaMQTT connection with HiveMQ, says noAuthrized HOT 1
- no support Vision OS
- [Information] Is there a way to forcibly clear the message queue?
- Crash with latest dependency updates HOT 8
- MQTT client does not connect, disconnects after receiving 0 data from broker HOT 1
- Bump Starscream dependency
- CocoaPods still supported? HOT 1
- crash with publishProperties HOT 2
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 cocoamqtt.