Skip to content

Commit

Permalink
[docs] Set callbacks before listening or connecting.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Nov 4, 2024
1 parent 7df2805 commit 47bc92b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/API/API-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 47bc92b

Please sign in to comment.