PubSubClient
MQTT client library for Arduino
Public Member Functions | List of all members
MQTT::Connect Class Reference

Message sent when connecting to a broker. More...

#include <MQTT.h>

+ Inheritance diagram for MQTT::Connect:
+ Collaboration diagram for MQTT::Connect:

Public Member Functions

 Connect (String cid)
 Connect with a client ID.
 
Connectset_clean_session (bool cs=true)
 Set the "clear session" flag.
 
Connectunset_clean_session (void)
 Unset the "clear session" flag.
 
Connectset_will (String willTopic, String willMessage, uint8_t willQos=0, bool willRetain=false)
 Set the "will" flag and associated attributes.
 
Connectunset_will (void)
 Unset the "will" flag and associated attributes.
 
Connectset_auth (String u, String p)
 Set the username and password for authentication.
 
Connectunset_auth (void)
 Unset the username and password for authentication.
 
uint16_t keepalive (void) const
 Get the keepalive period.
 
Connectset_keepalive (uint16_t k)
 Set the keepalive period.
 
- Public Member Functions inherited from MQTT::Message
bool send (Client &client)
 Send the message out.
 
message_type type (void) const
 Get the message type.
 
bool has_stream (void) const
 Does this message have a network stream for reading the (large) payload?
 

Additional Inherited Members

- Protected Member Functions inherited from MQTT::Message
 Message (message_type t, uint8_t f=0)
 Private constructor from type and flags.
 
virtual ~Message ()
 Virtual destructor.
 
uint8_t fixed_header_length (uint32_t rlength) const
 Length of the fixed header. More...
 
void write_fixed_header (uint8_t *buf, uint32_t &bufpos, uint32_t rlength) const
 Write the fixed header to a buffer. More...
 
bool need_packet_id (void) const
 Does this message need a packet id before being sent?
 
void set_packet_id (uint16_t pid)
 Set the packet id.
 
uint16_t packet_id (void) const
 Get the packet id.
 
void write_packet_id (uint8_t *buf, uint32_t &bufpos) const
 Write the packet id to a buffer. More...
 
- Protected Attributes inherited from MQTT::Message
message_type _type
 
uint8_t _flags
 
uint16_t _packet_id
 
bool _need_packet_id
 Not all message types use a packet id, but most do.
 
Client * _stream_client
 
payload_callback_t _payload_callback
 
friend PubSubClient
 

Detailed Description

Message sent when connecting to a broker.


The documentation for this class was generated from the following files: