#ifndef PLAINCONNECTION_H #define PLAINCONNECTION_H #ifdef _WIN32 #include #include #include "win32shim.h" #else #include "sys/socket.h" #include #include #endif #include #include #include #include #include "Packet.h" #include "Utils.h" typedef std::function timeoutCallback; class PlainConnection { public: PlainConnection(); ~PlainConnection(); int apSock; void connectToAp(std::string apAddress); void closeSocket(); timeoutCallback timeoutHandler; std::vector sendPrefixPacket(const std::vector &prefix, const std::vector &data); std::vector recvPacket(); std::vector readBlock(size_t size); size_t writeBlock(const std::vector &data); }; #endif