| 282 | |
| 283 | #if ENABLE_BONDING |
| 284 | extern "C" int SrtCheckGroupHook(void* , SRTSOCKET acpsock, int , const sockaddr*, const char* ) |
| 285 | { |
| 286 | static string gtypes[] = { |
| 287 | "undefined", // SRT_GTYPE_UNDEFINED |
| 288 | "broadcast", |
| 289 | "backup", |
| 290 | "balancing", |
| 291 | "multicast" |
| 292 | }; |
| 293 | |
| 294 | int type; |
| 295 | int size = sizeof type; |
| 296 | srt_getsockflag(acpsock, SRTO_GROUPCONNECT, &type, &size); |
| 297 | Verb("listener: @", acpsock, " - accepting ", (type ? "GROUP" : "SINGLE"), VerbNoEOL); |
| 298 | if (type != 0) |
| 299 | { |
| 300 | SRT_GROUP_TYPE gt; |
| 301 | size = sizeof gt; |
| 302 | if (-1 != srt_getsockflag(acpsock, SRTO_GROUPTYPE, >, &size)) |
| 303 | { |
| 304 | if (size_t(gt) < Size(gtypes)) |
| 305 | Verb(" type=", gtypes[gt], VerbNoEOL); |
| 306 | else |
| 307 | Verb(" type=", int(gt), VerbNoEOL); |
| 308 | } |
| 309 | } |
| 310 | Verb(" connection"); |
| 311 | |
| 312 | return 0; |
| 313 | } |
| 314 | #endif |
| 315 | |
| 316 | extern "C" int SrtUserPasswordHook(void* , SRTSOCKET acpsock, int hsv, const sockaddr*, const char* streamid) |
nothing calls this directly
no test coverage detected