Skip to content

Commit 99fa921

Browse files
committed
[core] Added getter for the SRTO_MAXREXMITBW socket option.
1 parent ea8ea9f commit 99fa921

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

srtcore/core.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,15 @@ void srt::CUDT::getOpt(SRT_SOCKOPT optName, void *optval, int &optlen)
559559
optlen = sizeof(int32_t);
560560
break;
561561

562+
#ifdef ENABLE_MAXREXMITBW
563+
case SRTO_MAXREXMITBW:
564+
if (size_t(optlen) < sizeof(m_config.llMaxRexmitBW))
565+
throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);
566+
*(int64_t*)optval = m_config.llMaxRexmitBW;
567+
optlen = sizeof(int64_t);
568+
break;
569+
#endif
570+
562571
case SRTO_STATE:
563572
*(int32_t *)optval = uglobal().getStatus(m_SocketID);
564573
optlen = sizeof(int32_t);

0 commit comments

Comments
 (0)