|
| MqttClient (bool withDefaultPayloadParser=true, bool autoDestruct=false) |
|
void | setKeepAlive (uint16_t seconds) |
|
void | setPingRepeatTime (unsigned seconds) |
|
bool | setWill (const String &topic, const String &message, uint8_t flags=0) |
|
bool | connect (const Url &url, const String &uniqueClientName, uint32_t sslOptions=0) |
| Connect to a MQTT server. More...
|
|
bool | publish (const String &topic, const String &message, uint8_t flags=0) |
|
bool | publish (const String &topic, IDataSourceStream *stream, uint8_t flags=0) |
|
bool | subscribe (const String &topic) |
|
bool | unsubscribe (const String &topic) |
|
void | setEventHandler (mqtt_type_t type, MqttDelegate handler) |
|
void | setPayloadParser (MqttPayloadParser payloadParser=0) |
|
void | setConnectedHandler (MqttDelegate handler) |
|
void | setPublishedHandler (MqttDelegate handler) |
|
void | setMessageHandler (MqttDelegate handler) |
|
void | setDisconnectHandler (TcpClientCompleteDelegate handler) |
|
bool | setWill (const String &topic, const String &message, int QoS, bool retained=false) |
|
bool | publishWithQoS (const String &topic, const String &message, int QoS, bool retained=false, MqttMessageDeliveredCallback onDelivery=nullptr) |
|
void | setCallback (MqttStringSubscriptionCallback subscriptionCallback=nullptr) |
| Provide a function to be called when a message is received from the broker. More...
|
|
|
void | onReadyToSendData (TcpConnectionEvent sourceEvent) override |
|
void | onFinished (TcpClientState finishState) override |
|
bool | connect (const String &server, int port, bool useSsl=false, uint32_t sslOptions=0) override |
|
bool | connect (IPAddress addr, uint16_t port, bool useSsl=false, uint32_t sslOptions=0) override |
|
void | close () override |
|
void | setReceiveDelegate (TcpClientDataDelegate receiveCb=nullptr) |
| Set or clear the callback for received data. More...
|
|
void | setCompleteDelegate (TcpClientCompleteDelegate completeCb=nullptr) |
| Set or clear the callback for connection close. More...
|
|
bool | send (const char *data, uint16_t len, bool forceCloseAfterSent=false) |
|
bool | sendString (const String &data, bool forceCloseAfterSent=false) |
|
bool | isProcessing () |
|
TcpClientState | getConnectionState () |
|
bool | addSslValidator (SslValidatorCallback callback, void *data=nullptr) |
| Allows setting of multiple SSL validators after a successful handshake. More...
|
|
bool | pinCertificate (const uint8_t *fingerprint, SslFingerprintType type) |
| Requires (pins) the remote SSL certificate to match certain fingerprints. More...
|
|
bool | pinCertificate (SslFingerprints &fingerprints) |
| Requires (pins) the remote SSL certificate to match certain fingerprints. More...
|
|
err_t | onConnected (err_t err) override |
|
err_t | onReceive (pbuf *buf) override |
|
err_t | onSent (uint16_t len) override |
|
void | onError (err_t err) override |
|
err_t | onSslConnected (SSL *ssl) override |
|
void | pushAsyncPart () |
|
void | freeStreams () |
|
void | setBuffer (ReadWriteStream *stream) |
|
int | writeString (const char *data, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
|
int | writeString (const String &data, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
|
virtual int | write (const char *data, int len, uint8_t apiflags=TCP_WRITE_FLAG_COPY) |
| Base write operation. More...
|
|
int | write (IDataSourceStream *stream) |
|
uint16_t | getAvailableWriteSize () |
|
void | flush () |
|
void | setTimeOut (uint16_t waitTimeOut) |
|
IPAddress | getRemoteIp () const |
|
uint16_t | getRemotePort () const |
|
void | setDestroyedDelegate (TcpConnectionDestroyedDelegate destroyedDelegate) |
| Sets a callback to be called when the object instance is destroyed. More...
|
|
void | addSslOptions (uint32_t sslOptions) |
|
bool | setSslClientKeyCert (const uint8_t *key, int keyLength, const uint8_t *certificate, int certificateLength, const char *keyPassword=nullptr, bool freeAfterHandshake=false) SMING_DEPRECATED |
| Sets client private key, certificate and password from memory. More...
|
|
bool | setSslClientKeyCert (const SslKeyCertPair &clientKeyCert, bool freeAfterHandshake=false) SMING_DEPRECATED |
| Sets client private key, certificate and password from memory. More...
|
|
void | freeSslClientKeyCert () SMING_DEPRECATED |
| Frees the memory used for the key and certificate pair. More...
|
|
bool | setSslKeyCert (const uint8_t *key, int keyLength, const uint8_t *certificate, int certificateLength, const char *keyPassword=nullptr, bool freeAfterHandshake=false) |
| Sets private key, certificate and password from memory for the SSL connection If this methods is called from a client then it sets the client key and certificate If it is called from a server then it sets the server certificate and key. Server and Client certificates differ. Client certificate is used for identification. Server certificate is used for encrypt/decrypt the data. Make sure to use the correct certificate for the desired goal. More...
|
|
bool | setSslKeyCert (const SslKeyCertPair &keyCert, bool freeAfterHandshake=false) |
| Sets private key, certificate and password from memory for the SSL connection If this methods is called from a client then it sets the client key and certificate If it is called from a server then it sets the server certificate and key. Server and Client certificates differ. Client certificate is used for identification. Server certificate is used for encrypt/decrypt the data. Make sure to use the correct certificate for the desired goal. More...
|
|
void | freeSslKeyCert () |
| Frees the memory used for the key and certificate pair. More...
|
|
void | setSsl (SSL *ssl) |
|
SSL * | getSsl () |
|
void | initialize (tcp_pcb *pcb) |
|
bool | internalConnect (IPAddress addr, uint16_t port) |
|
virtual err_t | onPoll () |
|
err_t | internalOnConnected (err_t err) |
|
err_t | internalOnReceive (pbuf *p, err_t err) |
|
err_t | internalOnSent (uint16_t len) |
|
err_t | internalOnPoll () |
|
void | internalOnError (err_t err) |
|
void | internalOnDnsResponse (const char *name, LWIP_IP_ADDR_T *ipaddr, int port) |
|