Skip to content

Commit b340e85

Browse files
committed
session client UPDATE client monitoring docs
Refs #616
1 parent 7a33188 commit b340e85

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/session_client.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,15 @@ typedef void (*nc_client_monitoring_clb)(struct nc_session *session, void *user_
649649
*
650650
* Once the thread is running, new sessions will be monitored automatically.
651651
*
652-
* Note that once you start the monitoring thread, any other client thread that
653-
* calls ::nc_session_free() needs to share the same thread context (or be the same thread)
654-
* as the thread that called this function (see ::nc_client_set_thread_context()).
652+
* This function should be called only once at the start of the application. To stop
653+
* the monitoring thread, use ::nc_client_monitoring_thread_stop().
654+
*
655+
* Note that the monitoring thread is bound to the thread context of the thread that
656+
* started it. Therefore, any other thread that calls functions managing connections
657+
* (such as ::nc_connect_ssh(), ::nc_connect_tls(), ...), ::nc_session_free(), or
658+
* ::nc_client_monitoring_thread_stop() needs to share the same thread context
659+
* (or be the same thread) as the thread that called this function
660+
* (see ::nc_client_set_thread_context()).
655661
*
656662
* @param[in] monitoring_clb Callback called whenever a session is terminated.
657663
* @param[in] user_data Arbitrary user data passed to the callback.

0 commit comments

Comments
 (0)