1: #include "global.h"
2:
3:
4: int
5: main(int argc, char **argv)
6: {
7: mqtt_msg_t *m;
8: int i;
9:
10: m = mqtt_msgAlloc(0);
11: printf("connect=%d/%d\n", m->msg_len, mqtt_msgCONNECT(m, "MRYN", "aaaaa", NULL, "bbb", NULL, 0, 0, 0));
12: for (i = 0; i < m->msg_len; i++)
13: printf("%d\n", ((u_char*) m->msg_base)[i]);
14: printf("connack=%d/%d\n", m->msg_len, mqtt_msgCONNACK(m, 1));
15: for (i = 0; i < m->msg_len; i++)
16: printf("%d\n", ((u_char*) m->msg_base)[i]);
17: mqtt_msgFree(&m, 42);
18: return 0;
19: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>