Xinlei Cao / Mbed 2 deprecated MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

util/SmartRestSocket.h

Committer:
xinlei
Date:
2015-04-20
Revision:
93:61d44636f020
Child:
96:ea056f6be2e8

File content as of revision 93:61d44636f020:

#ifndef SMARTRESTSOCKET_H
#define SMARTRESTSOCKET_H
#include "MDM.h"
#include "TCPSocketConnection.h"
#include "rtos.h"

class SmartRestSocket : public TCPSocketConnection
{
public:
        SmartRestSocket(MDMSerial& m): TCPSocketConnection(), mdm(m) {}
        virtual ~SmartRestSocket() {}
        int connect();
        int sendOnly(char *buf, int size);
        int sendAndReceive(char *buf, int size, int maxSize);
private:
        static char cachedIP[16];
        MDMSerial& mdm;
        Mutex ipLock;
};

#endif /* SMARTRESTSOCKET_H */