X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_client.hxx;fp=src%2Fsocket_client.hxx;h=8a379f8b2cbdf09ba398b89f15744165066559df;hp=a17ec88ad2119416ae8d795153c0159ab82cf447;hb=9424729586fdb0aabb671d2f1266bdb07e0bed38;hpb=07e98688a1a8c3e915ce923f79261a88251a9edd diff --git a/src/socket_client.hxx b/src/socket_client.hxx index a17ec88..8a379f8 100644 --- a/src/socket_client.hxx +++ b/src/socket_client.hxx @@ -24,7 +24,10 @@ namespace libt2n { +/** @brief a connection from client to server using sockets. + Use this class to connect from a client to a server. + */ class socket_client_connection : public client_connection, public socket_handler { static const int max_retries_default=3; @@ -45,6 +48,13 @@ class socket_client_connection : public client_connection, public socket_handler socket_client_connection(const std::string& _server, int _port, int _max_retries=max_retries_default); socket_client_connection(const std::string& _path, int _max_retries=max_retries_default); + /** @brief read data from the socket and copy it into buffer + @param usec_timeout wait until new data is found, max timeout usecs. + -1: wait endless + NULL: no timeout + @retval true if new data was found (does not mean that the received data + is a complete packet though) + */ bool fill_buffer(long long usec_timeout=-1) { return socket_handler::fill_buffer(buffer,usec_timeout); }