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:
parent
c6bb67c4b9
commit
2afb88c8de
2 changed files with 80 additions and 12 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue