+11
-7
lines changedFilter options
+11
-7
lines changed Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
## Motivation
4
4
5
-
One type of information that can be interchanged when a connection is being
6
-
established in SRT is "Stream ID", which can be used in a caller-listener
7
-
connection layout. This is a string of maximum 512 characters set on the caller
5
+
One type of information that an SRT caller can share with an SRT listener during a connection negotiation
6
+
is the "Stream ID". This is a string of maximum 512 characters set on the caller
8
7
side. It can be retrieved at the listener side on the newly accepted socket
9
8
through a socket option (see `SRTO_STREAMID` in [SRT API Socket Options](../API/API-socket-options.md)).
9
+
**Only caller-listener connections are supported.**
10
10
11
11
As of SRT version 1.3.3 a callback can be registered on the listener socket for
12
12
an application to make decisions on incoming caller connections. This callback,
@@ -17,16 +17,20 @@ the connection.
17
17
18
18
## Purpose
19
19
20
-
The Stream ID value can be used as free-form, but there is a recommended
21
-
convention so that all SRT users speak the same language. The intent of the
22
-
convention is to:
20
+
There are two target use-cases of the Stream ID:
21
+
- identify the file name of a stream that is about to be sent (simple use case);
22
+
- identify a user, the purpose of the connection (receive or send), the resources, and more (advanced use case).
23
+
24
+
The Stream ID can be provided as free-form value, especially when targeting the simple use case.
25
+
However, there is a recommended convention so that all SRT users speak the same language.
26
+
The intent of the convention is to:
23
27
24
28
- promote readability and consistency among free-form names
25
29
- interpret some typical data in the key-value style
26
30
27
31
In short,
28
32
29
-
1. `SRTO_STREAMID` is designed for a caller (client) to be able to identify itself, and state what it wants.
33
+
1. `SRTO_STREAMID` is designed for a caller (client) to be able to identify itself, and to state its intent (send/receive, live/file, etc.).
30
34
2. `srt_listen_callback(...)` function is used by a listener (server) to check what a caller (client) has provided in `SRTO_STREAMID` **before** the connection is established.
31
35
For example, the listener (server) can check if it knows the user and set the corresponding passphrase for a connection to be accepted.
32
36
3. Even if `srt_listen_callback(...)` accepts the connection, SRT will still have one more step to check the PASSPHRASE, and reject on mismatch.
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4