MCPcopy Create free account
hub / github.com/Haivision/srt / SrtCheckGroupHook

Function SrtCheckGroupHook

testing/srt-test-live.cpp:284–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282
283#if ENABLE_BONDING
284extern "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, &gt, &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
316extern "C" int SrtUserPasswordHook(void* , SRTSOCKET acpsock, int hsv, const sockaddr*, const char* streamid)

Callers

nothing calls this directly

Calls 2

srt_getsockflagFunction · 0.85
VerbFunction · 0.85

Tested by

no test coverage detected