MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / applyClientPropertiesUnsafe

Method applyClientPropertiesUnsafe

app/src/MQTT/Publisher.cpp:585–595  ·  view source on GitHub ↗

* @brief Writes the staged broker properties into the client. Caller must guarantee * state == Disconnected. */

Source from the content-addressed store, hash-verified

583 * state == Disconnected.
584 */
585void MQTT::PublisherWorker::applyClientPropertiesUnsafe()
586{
587 m_client->setHostname(m_cfg.hostname);
588 m_client->setPort(m_cfg.port);
589 m_client->setClientId(m_cfg.clientId);
590 m_client->setUsername(m_cfg.username);
591 m_client->setPassword(m_cfg.password);
592 m_client->setKeepAlive(m_cfg.keepAlive);
593 m_client->setCleanSession(m_cfg.cleanSession);
594 m_client->setProtocolVersion(m_cfg.mqttVersion);
595}
596
597/**
598 * @brief Opens the broker connection. No-op if disabled or already connecting/connected.

Callers

nothing calls this directly

Calls 7

setHostnameMethod · 0.45
setPortMethod · 0.45
setClientIdMethod · 0.45
setUsernameMethod · 0.45
setPasswordMethod · 0.45
setKeepAliveMethod · 0.45
setCleanSessionMethod · 0.45

Tested by

no test coverage detected