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

Function SockStatusStr

srtcore/common.cpp:534–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532// (also useful for applications)
533
534std::string SockStatusStr(SRT_SOCKSTATUS s)
535{
536 if (int(s) < int(SRTS_INIT) || int(s) > int(SRTS_NONEXIST))
537 return "???";
538
539 static struct AutoMap
540 {
541 // Values start from 1, so do -1 to avoid empty cell
542 std::string names[int(SRTS_NONEXIST)-1+1];
543
544 AutoMap()
545 {
546#define SINI(statename) names[SRTS_##statename-1] = #statename
547 SINI(INIT);
548 SINI(OPENED);
549 SINI(LISTENING);
550 SINI(CONNECTING);
551 SINI(CONNECTED);
552 SINI(BROKEN);
553 SINI(CLOSING);
554 SINI(CLOSED);
555 SINI(NONEXIST);
556#undef SINI
557 }
558 } names;
559
560 return names.names[int(s)-1];
561}
562
563#if ENABLE_BONDING
564std::string MemberStatusStr(SRT_MEMBERSTATUS s)

Callers 11

groupConnectMethod · 0.85
getBufferTimeBaseMethod · 0.85
sendBroadcastMethod · 0.85
send_CheckIdleMethod · 0.85
TEST_FFunction · 0.85
OpenGroupClientMethod · 0.85
UpdateGroupStatusMethod · 0.85
GroupReadMethod · 0.85

Calls

no outgoing calls

Tested by 4

TEST_FFunction · 0.68
OpenGroupClientMethod · 0.68
UpdateGroupStatusMethod · 0.68
GroupReadMethod · 0.68