3 #include "IoTSocketClient.hpp"
7 #define SIZE 10 /* how many items per packet */
8 #define NUM_PACKS 3 /* number of times we'll do it */
10 int main(int argc, char *argv[])
14 /* if no command line arguments passed, we'll default to
15 these two port number */
21 IoTSocketClient mylink(port, "127.0.0.1", rev, &bResult);
25 printf("Failed to create Client object!\n");
29 printf("Client, made connection...\n");
32 /* put some dummy data in our arrays */
34 for (int i = 0; i < SIZE; i++)
39 for (int i = 0; i < NUM_PACKS; i++)
41 printf("Client, receiving bytes, iteration %d\n", i);
43 mylink.receiveBytes(D);
49 str2 = mylink.receiveBytes(str);
51 cout << "Received text: " << s << endl;
53 printf("Client, closing connection...\n");
57 printf("Client, done...\n");