libt2n: (gerd) add client timeouts & tests, hello peek missing
[libt2n] / src / command_server.cpp
index 2aa4fc0..4f386ec 100644 (file)
@@ -123,12 +123,12 @@ void command_server::handle_packet(const std::string& packet, server_connection*
 }
 
 /** @brief handle incoming commands
-    @param usec_timeout wait until new data is found, max timeout usecs.
-            -1: wait endless, 0: no timeout
+    @param[in,out] usec_timeout wait until new data is found, max timeout usecs.
+            -1: wait endless, 0: instant return
 */
-void command_server::handle(long long usec_timeout)
+void command_server::handle(long long usec_timeout, long long* usec_timeout_remaining)
 {
-    if (s.fill_buffer(usec_timeout))
+    if (s.fill_buffer(usec_timeout,usec_timeout_remaining))
     {
         string packet;
         unsigned int conn_id;