X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fconnection.cpp;h=a1b22a7086daecd2c95f6276c566dcb12af729fb;hp=459194ded6c22a78d37f51ce4805f01103ce37cf;hb=9424729586fdb0aabb671d2f1266bdb07e0bed38;hpb=07e98688a1a8c3e915ce923f79261a88251a9edd diff --git a/src/connection.cpp b/src/connection.cpp index 459194d..a1b22a7 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -43,6 +43,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 +62,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