A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/45acb7466937c5fe0ad5e57d44efad1f38fd096b below:

[docs] Updated bonding API functions doc on return errors. · Haivision/srt@45acb74 · GitHub

38 38

| <img width=290px height=1px/> | <img width=720px height=1px/> |

39 39 40 40

<h3 id="socket-group-management">Socket Group Management</h3>

41 + 42 +

Since SRT v1.5.0.

41 43 42 44

| *Function / Structure* | *Description* |

43 45

|:------------------------------------------------- |:-------------------------------------------------------------------------------------------------------------- |

@@ -1150,11 +1152,18 @@ become `SRT_GST_IDLE`).

1150 1152

SRTSOCKET srt_create_group(SRT_GROUP_TYPE type);

1151 1153

```

1152 1154 1153 -

Creates a new group of type `type`. This is typically called on the

1154 -

caller side to be next used for connecting to the listener peer side.

1155 +

Creates a new group of type `type`. Is typically called on the

1156 +

caller side to be next used for connecting to a remote SRT listener.

1155 1157

The group ID is of the same domain as the socket ID, with the exception that

1156 1158

the `SRTGROUP_MASK` bit is set on it, unlike for socket ID.

1157 1159 1160 +

| Returns | |

1161 +

|:----------------------------- |:--------------------------------------------------------- |

1162 +

| `SRTSOCKET` | Group SRT socket ID. |

1163 +

| `SRT_INVALID_SOCK` | On error or if bonding API is disabled. |

1164 +

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1165 + 1166 + 1158 1167 1159 1168

[:arrow_up: &nbsp; Back to List of Functions & Structures](#srt-api-functions)

1160 1169

@@ -1163,11 +1172,17 @@ the `SRTGROUP_MASK` bit is set on it, unlike for socket ID.

1163 1172

#### srt_groupof

1164 1173 1165 1174

```

1166 -

SRTSOCKET srt_groupof(SRTSOCKET socket);

1175 +

SRTSOCKET srt_groupof(SRTSOCKET member);

1167 1176

```

1168 1177 1169 -

Returns the group ID of the socket, or `SRT_INVALID_SOCK` if the socket

1170 -

doesn't exist or it's not a member of any group.

1178 +

Retrieves the group SRT socket ID that corresponds to the member socket ID `member`.

1179 + 1180 + 1181 +

| Returns | |

1182 +

|:----------------------------- |:--------------------------------------------------------- |

1183 +

| `SRTSOCKET` | Corresponding group SRT socket ID of the member socket. |

1184 +

| `SRT_INVALID_SOCK` | The socket doesn't exist, it is not a member of any grou, or bonding API is disabled. |

1185 +

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1171 1186 1172 1187 1173 1188

[:arrow_up: &nbsp; Back to List of Functions & Structures](#srt-api-functions)

@@ -1200,16 +1215,16 @@ the number of elements filled. Otherwise the array will not be filled and

1200 1215

This function can be used to get the group size by setting `output` to `NULL`,

1201 1216

and providing `socketgroup` and `inoutlen`.

1202 1217 1203 -

| Returns | |

1204 -

|:----------------------------- |:--------------------------------------------------------- |

1205 -

| # of elements | The number of data elements filled, on success |

1206 -

| -1 | Error |

1218 +

| Returns | |

1219 +

|:----------------------------- |:-------------------------------------------------- |

1220 +

| # of elements | The number of data elements filled, on success |

1221 +

| -1 | Error |

1207 1222

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1208 1223 1209 1224 1210 1225

| Errors | |

1211 1226

|:---------------------------------- |:--------------------------------------------------------- |

1212 -

| [`SRT_EINVPARAM`](#srt_einvparam) | Reported if `socketgroup` is not an existing group ID |

1227 +

| [`SRT_EINVPARAM`](#srt_einvparam) | Reported if `socketgroup` is not an existing group ID. Or if bonding API is disabled. |

1213 1228

| [`SRT_ELARGEMSG`](#srt_elargemsg) | Reported if `inoutlen` if less than the size of the group |

1214 1229

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1215 1230

@@ -1237,19 +1252,18 @@ int srt_connect_group(SRTSOCKET group,

1237 1252

This function does almost the same as calling [`srt_connect`](#srt_connect) or

1238 1253

[`srt_connect_bind`](#srt_connect_bind) (when the source was specified for

1239 1254

[`srt_prepare_endpoint`](#srt_prepare_endpoint)) in a loop for every item specified

1240 -

in `name` array. However if you did this in blocking mode, the first call to

1255 +

in the `name` array. However if blocking mode is being used, the first call to

1241 1256

[`srt_connect`](#srt_connect) would block until the connection is established,

1242 1257

whereas this function blocks until any of the specified connections is established.

1243 1258 1244 -

If you set the group nonblocking mode ([`SRTO_RCVSYN`](API-socket-options.md#SRTO_RCVSYN)

1259 +

If the group nonblocking mode is set ([`SRTO_RCVSYN`](API-socket-options.md#SRTO_RCVSYN)

1245 1260

option), there's no difference, except that the [`SRT_SOCKGROUPCONFIG`](#SRT_SOCKGROUPCONFIG)

1246 -

structure allows you to add extra configuration data used by groups. Note also that

1261 +

structure allows adding extra configuration data used by groups. Note also that

1247 1262

this function accepts only groups, not sockets.

1248 1263 1249 1264

The elements of the `name` array need to be prepared with the use of the

1250 1265

[`srt_prepare_endpoint`](#srt_prepare_endpoint) function. Note that it is

1251 -

**NOT** required that every target address you specify for it is of the same

1252 -

family.

1266 +

**NOT** required that every target address specified is of the same family.

1253 1267 1254 1268

Return value and errors in this function are the same as in [`srt_connect`](#srt_connect),

1255 1269

although this function reports success when at least one connection has

@@ -1279,6 +1293,19 @@ The fields of [`SRT_SOCKGROUPCONFIG`](#SRT_SOCKGROUPCONFIG) structure have the f

1279 1293

* [`errorcode`](#error-codes): status of connection for that link ([`SRT_SUCCESS`](#srt_success) if succeeded)

1280 1294

* `token`: same as in input, or a newly created token value if input was -1

1281 1295 1296 +

| Returns | |

1297 +

|:----------------------------- |:-------------------------------------------------- |

1298 +

| `SRT_SOCKET` | The socket ID of the first connected member. |

1299 +

| -1 | Error |

1300 +

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1301 + 1302 + 1303 +

| Errors | |

1304 +

|:---------------------------------- |:--------------------------------------------------------- |

1305 +

| [`SRT_EINVPARAM`](#srt_einvparam) | Reported if `socketgroup` is not an existing group ID. Or if bonding API is disabled. |

1306 +

| [`SRT_ECONNLOST`](#srt_econnlost) | Reported if none of member sockets has connected. |

1307 +

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1308 + 1282 1309

The procedure of connecting for every connection definition specified

1283 1310

in the `name` array is performed the following way:

1284 1311

@@ -1379,6 +1406,9 @@ would be reported only by [`srt_connect_group`](#srt_connect_group), separately

1379 1406

for every individual connection, and the status can be obtained from

1380 1407

the [`errorcode`](#error-codes) field.

1381 1408 1409 +

Note that the `errorcode` field of the `SRT_SOCKGROUPCONFIG` returned would be set to `SRT_EINVOP`

1410 +

if the bonding API is disabled (`ENABLE_BONDING=OFF`).

1411 + 1382 1412 1383 1413

[:arrow_up: &nbsp; Back to List of Functions & Structures](#srt-api-functions)

1384 1414

@@ -1399,6 +1429,7 @@ should delete it using [`srt_delete_config`](#srt_delete_config).

1399 1429

| Returns | |

1400 1430

|:----------------------------- |:------------------------------------------------------------------ |

1401 1431

| Pointer | The pointer to the created object (memory allocation errors apply) |

1432 +

| NULL | If bonding API is disabled. |

1402 1433

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1403 1434 1404 1435

@@ -1459,7 +1490,7 @@ The following options are allowed to be set on the member socket:

1459 1490 1460 1491

| Errors | |

1461 1492

|:---------------------------------- |:--------------------------------------------------------------------- |

1462 -

| [`SRT_EINVPARAM`](#srt_einvparam) | This option is not allowed to be set on a socket being a group member |

1493 +

| [`SRT_EINVPARAM`](#srt_einvparam) | This option is not allowed to be set on a socket being a group member. Or if bonding API is disabled. |

1463 1494

| <img width=240px height=1px/> | <img width=710px height=1px/> |

1464 1495 1465 1496

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