Open truongsinh opened 7 years ago
Hi @truongsinh, sorry for the delay! That indeed looks promising, I'll be happy to merge your pull request for that feature.
I'm afraid you'll have to dig a bit into engine.io internals though :muscle:
hey any update on this?
@hearsh I'm afraid no work has been done on our side yet, I don't know if @truongsinh has had some time to dedicate to it.
add MQTT transport over TCP is not possible (this version of engine.io depends on HTTP(request, URL))
but look at my idea : 1 - serve MQTT broker (Mosca, etc) with node js or any server 2 - implement MQTT transport in engine.io as an independent module 3 - in MQTT transport req data will be emulated
You want to:
Status quo
"Transport" only supports
['polling', 'websocket']
Expected implementation
"Transport" supports
['polling', 'websocket', 'mqtt']
Rationale
When developing mobile apps (aka non-web), MQTT over TCP performs much better than HTTP (polling, websocket, or MQTT over websocket), however, like the adoption of websocket, MQTT over TCP might be stopped by firewall. In an ideal scenario, app developers should not care about the transportation, but focus on the logic. Transportation layer should gracefully chooses the best method, given the conditions. Ref https://www.quora.com/Is-MQTT-better-than-HTTP-for-mobile-app-iOS-Android-etc-client-server-communication
Other information:
['polling', 'websocket', require('mqtt-engine')]