Optimized socket library, added generic splitter function

This commit is contained in:
Thulinma 2017-06-01 20:52:32 +02:00
parent c7c94dc3c3
commit 05387f01fb
2 changed files with 51 additions and 12 deletions

View file

@ -32,8 +32,11 @@ namespace Socket{
std::deque<std::string> data;
public:
std::string splitter;///<String to automatically split on if encountered. \n by default
Buffer();
unsigned int size();
unsigned int bytes(unsigned int max);
unsigned int bytesToSplit();
void append(const std::string &newdata);
void append(const char *newdata, const unsigned int newdatasize);
void prepend(const std::string &newdata);