Diff for /mqtt/example/Attic/cmds.c between versions 1.1 and 1.1.2.1

version 1.1, 2011/11/21 14:45:35 version 1.1.2.1, 2011/11/21 14:45:35
Line 0 Line 1
   #include <stdio.h>
   #include <sys/types.h>
   #include <aitmqtt.h>
   
   
   int
   main()
   {
           mqtt_msg_t *m;
           int i;
   
           m = mqtt_msgAlloc(0);
           /* conn* */
           printf("connect=%d/%d\n", m->msg_len, mqtt_msgCONNECT(m, "MRYN", "aaaaa", NULL, "bbb", NULL, 0, 0, 0));
           for (i = 0; i < m->msg_len; i++)
                   printf("%d\n", ((u_char*) m->msg_base)[i]);
           printf("connack=%d/%d\n", m->msg_len, mqtt_msgCONNACK(m, 1));
           for (i = 0; i < m->msg_len; i++)
                   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", 1, 0, 0, 0));
           for (i = 0; i < m->msg_len; i++)
                   printf("%d\n", ((u_char*) m->msg_base)[i]);
   
           mqtt_msgFree(&m, 42);
           return 0;
   }

Removed from v.1.1  
changed lines
  Added in v.1.1.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>