-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do I use mqtt protocol to connect, and finally become WS protocol #1488
Comments
Can someone help me? I'm a novice. I've been fooled by this for two days |
Hi, |
MQTT is a protocol. A protocol is a set of pre-defined instructions computers use to communicate or understand each other when connected. So MQTT is just a language computers speak when connected. other examples of protocols are HTTP, HTTPS. These are mainly for resource sharing. Now let's talk about the connection. Computers are able to connect with one another using the TCP/IP internet protocol. For native use, we are able to use the TCP/IP on a computer(mostly called socket connections) but in the browser, we don't have access to that. Hence, we replace it with WebSockets with seems to work quit similar as that in the browser |
In short, mqtt.js only use websockets whatever you set it to mqtt:// or ws://. So, you need to make sure the borker you want to connect has using websockets on that port. |
MQTT 5.0.0 BETA is now available! Try it out and give us feedback: |
I have fixed Browser docs by adding webpack and vite setup. Check them out |
The text was updated successfully, but these errors were encountered: