https://www.hi-todd.com/websocket/
I have created one demo with MQTT protocol and it is working fine with HTTP connection. But when I tried to change HTTP to https then it is getting a connection error.
I have added certificate path in mosquitto.conf file. Let me share with you Mosquitto config path.
# WebSockets over TLS/SSL
listener 8083
protocol websockets
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/ca_certificates/hi-todd_com.crt
keyfile /etc/mosquitto/ca_certificates/hi-todd_com.p7b
I have used below library code.
https://www.cloudmqtt.com/docs-websocket.html