edusperoni / nativescript-mqtt

MQTT 3.1.1 for Nativescript
Apache License 2.0
12 stars 3 forks source link

Does this plugin implement pure mqtt as well ? #19

Closed StdyingIT closed 3 years ago

StdyingIT commented 3 years ago

I'm sorry this isn't exactly an issue but I wasn't able to get the information over the internet.

Does this plugin allow pure mqtt ? From the documentation : "Currently the library only supports the websocket protocol for cross-platform on port 80 or 443 for SSL." It is not clear to me if it only supports websocket protocol at all or if it supports both TCP and websockets, with ports limitation on websockets.

Thanks in advance for your answers & for hardwork !

edusperoni commented 3 years ago

It only supports MQTT over Websockets for now, no native tcp connections. You can connect to other ports as long as they're websocket compatible so the 80/443 port restriction is wrong.

I might look into porting it over to native with https://github.com/eclipse/paho.mqtt.android, but on the iOS side there's no paho library, so we'd probably have to go with https://github.com/emqx/CocoaMQTT or https://github.com/novastone-media/MQTT-Client-Framework.

This plugin currently is just some helpers around the paho mqtt javascript implementation, which doesn't support native mqtt

StdyingIT commented 3 years ago

I see, thank you !