From 47bc92bf42e3b686ca6b5ab249c089e33c2790be Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Mon, 4 Nov 2024 12:05:21 +0100 Subject: [PATCH] [docs] Set callbacks before listening or connecting. --- docs/API/API-functions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/API/API-functions.md b/docs/API/API-functions.md index 74fbc506f..2fdb8a661 100644 --- a/docs/API/API-functions.md +++ b/docs/API/API-functions.md @@ -751,6 +751,9 @@ automatically created to handle the incoming connection on the listening socket (and is about to be returned by [`srt_accept`](#srt_accept)), but before the connection has been accepted. +Note the callback must be set before starting listening, +i.e. before `srt_listen` is called. + **Arguments**: * `lsn`: Listening socket where you want to install the callback hook @@ -1020,6 +1023,9 @@ mode ([`SRTO_RCVSYN`](API-socket-options.md#SRTO_RCVSYN) option set to true). It is guaranteed to be called when a socket is in non-blocking mode, or when you use a group. +Note the callback must be set before starting the connection procedure, +i.e. before `srt_connect`, `srt_connect_bind`, etc. is called. + This function is mainly intended to be used with group connections. Note that even if you use a group connection in blocking mode, after the group is considered connected the member connections still continue in background. Also, when some