Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] mqtt.cpp server_response doesn't return scheme

Hi.

 

I’m wondering why the ‘get_server_uri’ doesn’t include the scheme for the broker that it is connected…

 

            auto connRsp = m_connectToken->get_connect_response();

            qDebug() << "Connected to server:" << connRsp.get_server_uri().c_str() << "using MQTT version" << connRsp.get_mqtt_version() << \

                "and" << (connRsp.is_session_present() ? "with" : "without") << "a persisted session available.";

 

I am ideally looking for a way to determine whether the newly connected connection is using a secure or insecure link. The only useful part in the mqtt::connect_response class is get_server_uri() and was hoping to extract either ‘mqtt’ or ‘mqtts’. The scheme is always blank however and all that is returned is the authority (host:port).

 

Gary Metalle
Senior Embedded Software Engineer
   

 

 


Back to the top