X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fconnection.cpp;h=361cfda8f42384ccc365e9af506f012bb2c11808;hp=459194ded6c22a78d37f51ce4805f01103ce37cf;hb=d535333ffe637c9e547e68b792f334c229641520;hpb=644c4d262aab14ee4ec1cfade83a2e99568098d3 diff --git a/src/connection.cpp b/src/connection.cpp index 459194d..361cfda 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -19,6 +19,7 @@ #include #include +#include #include "connection.hxx" @@ -43,6 +44,11 @@ connection::packet_size_indicator connection::bytes_available() return psize; } +/** @brief read a complete data packet from the buffer. The packet is removed from the + connection buffer. + @param[out] data the data package + @retval true if packet found +*/ bool connection::get_packet(std::string& data) { packet_size_indicator psize; @@ -57,6 +63,7 @@ bool connection::get_packet(std::string& data) return false; } +/// send a blob to the peer void connection::write(const std::string& data) { // prepend packet size to data