/// \file socket.h /// A handy Socket wrapper library. /// Written by Jaron Vietor in 2010 for DDVTech #pragma once #include #include #include #include #include #include #include #include #include #include #include #include // for being friendly with Socket::Connection down below namespace Buffer{ class user; } /// Holds Socket tools. namespace Socket{ void hostBytesToStr(const char *bytes, size_t len, std::string &target); bool isBinAddress(const std::string &binAddr, std::string matchTo); bool matchIPv6Addr(const std::string &A, const std::string &B, uint8_t prefix); std::string getBinForms(std::string addr); /// A buffer made out of std::string objects that can be efficiently read from and written to. class Buffer{ private: std::deque data; public: std::string splitter;///