version 1.1.2.2, 2011/11/21 14:51:23
|
version 1.1.2.3, 2011/11/21 14:55:10
|
Line 19 main()
|
Line 19 main()
|
printf("%d\n", ((u_char*) m->msg_base)[i]); |
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
|
/* pub* */ |
/* pub* */ |
printf("publish=%d/%d\n", m->msg_len, mqtt_msgPUBLISH(m, "AAA/bbb/CCC/ddd", 0, 0, 0)); | printf("publish=%d/%d\n", m->msg_len, mqtt_msgPUBLISH(m, "AAA/bbb/CCC/ddd", 7, 0, 2)); |
for (i = 0; i < m->msg_len; i++) |
for (i = 0; i < m->msg_len; i++) |
printf("%d\n", ((u_char*) m->msg_base)[i]); |
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
printf("puback=%d/%d\n", m->msg_len, mqtt_msgPUBACK(m, 10)); |
|
for (i = 0; i < m->msg_len; i++) |
|
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
printf("pubrec=%d/%d\n", m->msg_len, mqtt_msgPUBREC(m, 11)); |
|
for (i = 0; i < m->msg_len; i++) |
|
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
printf("pubrel=%d/%d\n", m->msg_len, mqtt_msgPUBREL(m, 12)); |
|
for (i = 0; i < m->msg_len; i++) |
|
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
printf("pubcomp=%d/%d\n", m->msg_len, mqtt_msgPUBCOMP(m, 13)); |
|
for (i = 0; i < m->msg_len; i++) |
|
printf("%d\n", ((u_char*) m->msg_base)[i]); |
|
|
|
/* sub* */ |
|
|
mqtt_msgFree(&m, 42); |
mqtt_msgFree(&m, 42); |
return 0; |
return 0; |