--- mqtt/example/Attic/cmds.c 2011/11/21 14:51:23 1.1.2.2 +++ mqtt/example/Attic/cmds.c 2011/11/21 14:55:10 1.1.2.3 @@ -19,9 +19,23 @@ main() printf("%d\n", ((u_char*) m->msg_base)[i]); /* 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++) 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); return 0;