63 len += (int)strlen(client->
username)+2;
145 char* curdata =
data;
146 char* enddata = &data[datalen];
163 else if (datalen > 2)
243 datalen = 2 + topics->
count * 3;
245 datalen += (int)strlen((
char*)(elem->
content));
249 ptr = data =
malloc(datalen);
264 subopts = *(
int*)(qosElem->content);
267 subopts |= (opts[i].
noLocal << 2);
295 char* curdata =
data;
296 char* enddata = &data[datalen];
319 while ((
size_t)(curdata - data) < datalen)
321 unsigned int* newint;
322 newint =
malloc(
sizeof(
unsigned int));
332 *newint = (
unsigned int)
readChar(&curdata);
373 datalen = 2 + topics->
count * 2;
375 datalen += (int)strlen((
char*)(elem->
content));
378 ptr = data =
malloc(datalen);
411 char* curdata =
data;
412 char* enddata = &data[datalen];
435 while ((
size_t)(curdata - data) < datalen)
MQTTProperties properties
int MQTTProperties_read(MQTTProperties *properties, char **pptr, char *enddata)
MQTTProperties properties
void * MQTTPacket_suback(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
int MQTTProperties_len(MQTTProperties *props)
int MQTTProperties_write(char **pptr, const MQTTProperties *properties)
void MQTTProperties_free(MQTTProperties *props)
void MQTTPacket_freeConnack(Connack *pack)
unsigned char readChar(char **pptr)
int MQTTPacket_send_connect(Clients *client, int MQTTVersion, MQTTProperties *connectProperties, MQTTProperties *willProperties)
struct Connect::@60::@61 bits
void writeInt(char **pptr, int anInt)
unsigned char retainAsPublished
MQTTProperties properties
void writeChar(char **pptr, char c)
void * MQTTPacket_connack(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
ListElement * ListNextElement(List *aList, ListElement **pos)
int MQTTPacket_send_subscribe(List *topics, List *qoss, MQTTSubscribe_options *opts, MQTTProperties *props, int msgid, int dup, Clients *client)
void writeData(char **pptr, const void *data, int datalen)
#define MQTTVERSION_3_1_1
void Log(enum LOG_LEVELS log_level, int msgno, const char *format,...)
int MQTTPacket_send_unsubscribe(List *topics, MQTTProperties *props, int msgid, int dup, Clients *client)
void writeUTF(char **pptr, const char *string)
ListElement * ListAppend(List *aList, void *content, size_t size)
void * MQTTPacket_unsuback(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
int MQTTPacket_send_pingreq(networkHandles *net, const char *clientID)
int MQTTPacket_send(networkHandles *net, Header header, char *buffer, size_t buflen, int freeData, int MQTTVersion)
List * ListInitialize(void)
unsigned char retainHandling
void ListFree(List *aList)
#define TCPSOCKET_INTERRUPTED
unsigned int cleansession
#define MQTTProperties_initializer