#define CloudComm_HMAC_SIZE 32
#define HttpURLConnection_HTTP_OK 200
+typedef struct {
+ int fd;
+ int numBytes;
+} WebConnection;
+
class CloudComm {
private:
Array<char> *createIV(int64_t machineId, int64_t localSequenceNumber);
Array<char> *encryptSlotAndPrependIV(Array<char> *rawData, Array<char> *ivBytes);
Array<char> *stripIVAndDecryptSlot(Array<char> *rawData);
- Array<Slot *> *processSlots(int fd);
+ Array<Slot *> *processSlots(WebConnection *wc);
public:
*/
CloudComm(Table *_table, IoTString *_baseurl, IoTString *_password, int _listeningPort);
~CloudComm();
-
+
/**
* Inits all the security stuff
*/