| Home | Libraries | People | FAQ | More

##### boost::mqtt5::mqtt_client::connect_property

Assign a property that will be sent in a `CONNECT` packet.

###### Synopsis

    template<
        prop::property_type p>
    boost::mqtt5::mqtt_client&
    connect_property(
        std::integral_constant< prop::property_type, p > prop,
        boost::mqtt5::prop::value_type_t< p > value);

###### Parameters

Name | Description
--- | ---
`prop` | The `boost::mqtt5::connect_props` property to set.
`value` | Value that will be assigned to the property.

###### Example

    client.connect_property(prop::session_expiry_interval, 40); // ok
    client.connect_property(prop::reason_string, "reason"); // does not compile, not a CONNECT prop!

###### See Also

See `boost::mqtt5::connect_props` for all eligible properties.