Overloaded Socket::Connection::Send with new versions and now requires arguments to be passed by reference. Also fixed a ::close bug and hugely improved performance.

This commit is contained in:
Thulinma 2012-08-31 16:54:54 +02:00
parent c6bb67c4b9
commit 2afb88c8de
2 changed files with 80 additions and 12 deletions

View file

@ -56,7 +56,9 @@ namespace Socket{
bool spool(); ///< Updates the downbuffer and upbuffer internal variables.
bool flush(); ///< Updates the downbuffer and upbuffer internal variables until upbuffer is empty.
std::string & Received(); ///< Returns a reference to the download buffer.
void Send(std::string data); ///< Appends data to the upbuffer.
void Send(std::string & data); ///< Appends data to the upbuffer.
void Send(const char * data); ///< Appends data to the upbuffer.
void Send(const char * data, size_t len); ///< Appends data to the upbuffer.
//stats related methods
unsigned int dataUp(); ///< Returns total amount of bytes sent.
unsigned int dataDown(); ///< Returns total amount of bytes received.