libt2n: (gerd) add client timeouts & tests, hello peek missing
[libt2n] / src / socket_client.hxx
index a35bbfd..1d82400 100644 (file)
@@ -54,13 +54,15 @@ class socket_client_connection : public client_connection, public socket_handler
 
         /** @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
+                  -1: wait endless
+                   0: return instantly
+            @param usec_timeout_remaining if non-NULL the function will write the
+                  not used time to the given target
             @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); }
+        bool fill_buffer(long long usec_timeout=-1, long long *usec_timeout_remaining=NULL)
+            { return socket_handler::fill_buffer(buffer,usec_timeout,usec_timeout_remaining); }
 
         void close();
 };