DDD
Dependencies: HW4 FP MQTTPacket
Fork of MQTT by
Diff: MQTTClient.cpp
- Revision:
- 7:f9d690fb6dad
- Parent:
- 6:4d312a49200b
- Child:
- 8:c46930bd6c82
--- a/MQTTClient.cpp Tue Apr 08 22:54:37 2014 +0000 +++ b/MQTTClient.cpp Wed Apr 09 11:37:28 2014 +0100 @@ -21,8 +21,8 @@ { buf = new char[buffer_size]; - readbuf = new char[buffer_size]; - this->ipstack = ipstack; + readbuf = new char[buffer_size]; + buflen = readbuflen = buffer_size; this->command_timeout = command_timeout; //this->thread = new Thread(0); // only need a background thread for non-blocking mode this->ipstack = network; @@ -153,7 +153,8 @@ } this->keepalive = options->keepAliveInterval; - len = MQTTSerialize_connect(buf, buflen, options); + len = MQTTSerialize_connect(buf, buflen, options); + printf("len from send is %d %d\n", len, buflen); rc = sendPacket(len); // send the connect packet printf("rc from send is %d\n", rc); @@ -205,4 +206,4 @@ } return rc; -} \ No newline at end of file +}