#include "LinkedList.h"
#include "MQTTPacket.h"
#include "Clients.h"
#include "Log.h"
#include "Messages.h"
#include "MQTTProtocol.h"
#include "MQTTProtocolClient.h"
Go to the source code of this file.
|
size_t | MQTTProtocol_addressPort (const char *uri, int *port, const char **topic, int default_port) |
|
int | MQTTProtocol_connect (const char *ip_address, Clients *acClients, int websocket, int MQTTVersion, MQTTProperties *connectProperties, MQTTProperties *willProperties) |
|
int | MQTTProtocol_handlePingresps (void *pack, int sock) |
|
int | MQTTProtocol_handleSubacks (void *pack, int sock) |
|
int | MQTTProtocol_handleUnsubacks (void *pack, int sock) |
|
void | MQTTProtocol_reconnect (const char *ip_address, Clients *client) |
|
int | MQTTProtocol_subscribe (Clients *client, List *topics, List *qoss, int msgID, MQTTSubscribe_options *opts, MQTTProperties *props) |
|
int | MQTTProtocol_unsubscribe (Clients *client, List *topics, int msgID, MQTTProperties *props) |
|
#define MQTT_DEFAULT_PORT 1883 |
#define SECURE_MQTT_DEFAULT_PORT 8883 |
#define WS_DEFAULT_PORT 80 |
size_t MQTTProtocol_addressPort |
( |
const char * |
uri, |
|
|
int * |
port, |
|
|
const char ** |
topic, |
|
|
int |
default_port |
|
) |
| |
Separates an address:port into two separate values
- Parameters
-
[in] | uri | the input string - hostname:port |
[out] | port | the returned port integer |
[out] | topic | optional topic portion of the address starting with '/' |
- Returns
- the address string
Definition at line 54 of file MQTTProtocolOut.c.
MQTT outgoing connect processing for a client
- Parameters
-
ip_address | the TCP address:port to connect to |
aClient | a structure with all MQTT data needed |
int | ssl |
int | MQTTVersion the MQTT version to connect with (3 or 4) |
long | timeout how long to wait for a new socket to be created |
- Returns
- return code
Definition at line 149 of file MQTTProtocolOut.c.
int MQTTProtocol_handlePingresps |
( |
void * |
pack, |
|
|
int |
sock |
|
) |
| |
Process an incoming pingresp packet for a socket
- Parameters
-
pack | pointer to the publish packet |
sock | the socket on which the packet was received |
- Returns
- completion code
Definition at line 335 of file MQTTProtocolOut.c.
int MQTTProtocol_handleSubacks |
( |
void * |
pack, |
|
|
int |
sock |
|
) |
| |
Process an incoming suback packet for a socket
- Parameters
-
pack | pointer to the publish packet |
sock | the socket on which the packet was received |
- Returns
- completion code
Definition at line 376 of file MQTTProtocolOut.c.
int MQTTProtocol_handleUnsubacks |
( |
void * |
pack, |
|
|
int |
sock |
|
) |
| |
Process an incoming unsuback packet for a socket
- Parameters
-
pack | pointer to the publish packet |
sock | the socket on which the packet was received |
- Returns
- completion code
Definition at line 414 of file MQTTProtocolOut.c.
void MQTTProtocol_reconnect |
( |
const char * |
ip_address, |
|
|
Clients * |
client |
|
) |
| |
MQTT outgoing subscribe processing for a client
- Parameters
-
client | the client structure |
topics | list of topics |
qoss | corresponding list of QoSs |
opts | MQTT 5.0 subscribe options |
props | MQTT 5.0 subscribe properties |
- Returns
- completion code
Definition at line 358 of file MQTTProtocolOut.c.
MQTT outgoing unsubscribe processing for a client
- Parameters
-
client | the client structure |
topics | list of topics |
- Returns
- completion code
Definition at line 397 of file MQTTProtocolOut.c.