USE YHTANG AWS ACCOUNT TO TEST MQTT
Dependents: NuMaker-mbed-AWS-IoT-example
Diff: MQTTSocket.h
- Revision:
- 36:2f1ada427e56
- Parent:
- 31:a51dd239b78e
- Child:
- 43:21da1f744243
diff -r 063dc3b472d5 -r 2f1ada427e56 MQTTSocket.h --- a/MQTTSocket.h Fri Aug 01 13:13:35 2014 +0000 +++ b/MQTTSocket.h Fri Aug 01 14:45:25 2014 +0000 @@ -13,16 +13,16 @@ return mysock.connect(hostname, port); } - int read(char* buffer, int len, int timeout) + int read(unsigned char* buffer, int len, int timeout) { mysock.set_blocking(false, timeout); - return mysock.receive(buffer, len); + return mysock.receive((char*)buffer, len); } - int write(char* buffer, int len, int timeout) + int write(unsigned char* buffer, int len, int timeout) { mysock.set_blocking(false, timeout); - return mysock.send(buffer, len); + return mysock.send((char*)buffer, len); } int disconnect()