mirror of
https://github.com/Haivision/srt.git
synced 2026-07-04 15:07:49 +00:00
[API] Drop EXPERIMENTAL from ENABLE_EXPERIMENTAL_BONDING
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: configure
|
||||
run: |
|
||||
mkdir _build && cd _build
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON
|
||||
- name: build
|
||||
run: cd _build && cmake --build ./
|
||||
- name: test
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: configure
|
||||
run: |
|
||||
mkdir _build && cd _build
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON
|
||||
- name: build
|
||||
run: cd _build && cmake --build ./
|
||||
- name: test
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: configure
|
||||
run: |
|
||||
md _build && cd _build
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
|
||||
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON
|
||||
- name: build
|
||||
run: cd _build && cmake --build ./ --config Release
|
||||
- name: test
|
||||
|
||||
@@ -20,6 +20,6 @@ jobs:
|
||||
- name: configure
|
||||
run: |
|
||||
mkdir _build && cd _build
|
||||
cmake ../ -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_UNITTESTS=OFF -DENABLE_EXPERIMENTAL_BONDING=ON --toolchain scripts/iOS.cmake
|
||||
cmake ../ -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_UNITTESTS=OFF -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
|
||||
- name: build
|
||||
run: cd _build && cmake --build ./
|
||||
|
||||
@@ -2,4 +2,4 @@ extraction:
|
||||
cpp:
|
||||
configure:
|
||||
command:
|
||||
- cmake . -DENABLE_HEAVY_LOGGING=1 -DENABLE_EXPERIMENTAL_BONDING=1
|
||||
- cmake . -DENABLE_HEAVY_LOGGING=1 -DENABLE_BONDING=1
|
||||
|
||||
+2
-2
@@ -23,12 +23,12 @@ matrix:
|
||||
- os: linux
|
||||
env:
|
||||
- BUILD_TYPE=Debug
|
||||
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_EXPERIMENTAL_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
|
||||
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
|
||||
- RUN_SONARCUBE=1
|
||||
- RUN_CODECOV=1
|
||||
- env:
|
||||
- BUILD_TYPE=Debug
|
||||
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_EXPERIMENTAL_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
|
||||
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
|
||||
- os: linux
|
||||
env: BUILD_TYPE=Release
|
||||
- os: osx
|
||||
|
||||
+9
-4
@@ -129,7 +129,7 @@ else()
|
||||
option(ENABLE_CXX11 "Should the c++11 parts (srt-live-transmit) be enabled" ON)
|
||||
endif()
|
||||
option(ENABLE_APPS "Should the Support Applications be Built?" ON)
|
||||
option(ENABLE_EXPERIMENTAL_BONDING "Should the EXPERIMENTAL bonding functionality be enabled?" OFF)
|
||||
option(ENABLE_BONDING "Should the bonding functionality be enabled?" OFF)
|
||||
option(ENABLE_TESTING "Should the Developer Test Applications be Built?" OFF)
|
||||
option(ENABLE_PROFILE "Should instrument the code for profiling. Ignored for non-GNU compiler." $ENV{HAI_BUILD_PROFILE})
|
||||
option(ENABLE_LOGGING "Should logging be enabled" ON)
|
||||
@@ -674,8 +674,13 @@ if (ENABLE_GETNAMEINFO)
|
||||
list(APPEND SRT_EXTRA_CFLAGS "-DENABLE_GETNAMEINFO=1")
|
||||
endif()
|
||||
|
||||
# ENABLE_EXPERIMENTAL_BONDING is deprecated. Use ENABLE_BONDING. ENABLE_EXPERIMENTAL_BONDING is be removed in v1.6.0.
|
||||
if (ENABLE_EXPERIMENTAL_BONDING)
|
||||
list(APPEND SRT_EXTRA_CFLAGS "-DENABLE_EXPERIMENTAL_BONDING=1")
|
||||
message(DEPRECATION "ENABLE_EXPERIMENTAL_BONDING is deprecated. Please use ENABLE_BONDING instead.")
|
||||
endif()
|
||||
|
||||
if (ENABLE_BONDING OR ENABLE_EXPERIMENTAL_BONDING)
|
||||
list(APPEND SRT_EXTRA_CFLAGS "-DENABLE_BONDING=1")
|
||||
endif()
|
||||
|
||||
if (ENABLE_THREAD_CHECK)
|
||||
@@ -1222,7 +1227,7 @@ if (ENABLE_APPS)
|
||||
srt_add_testprogram(srt-test-multiplex)
|
||||
srt_make_application(srt-test-multiplex)
|
||||
|
||||
if (ENABLE_EXPERIMENTAL_BONDING)
|
||||
if (ENABLE_BONDING)
|
||||
srt_add_testprogram(srt-test-mpbond)
|
||||
srt_make_application(srt-test-mpbond)
|
||||
endif()
|
||||
@@ -1257,7 +1262,7 @@ if (ENABLE_EXAMPLES)
|
||||
|
||||
srt_add_example(test-c-server.c)
|
||||
|
||||
if (ENABLE_EXPERIMENTAL_BONDING)
|
||||
if (ENABLE_BONDING)
|
||||
srt_add_example(test-c-client-bonding.c)
|
||||
|
||||
srt_add_example(test-c-server-bonding.c)
|
||||
|
||||
@@ -70,7 +70,7 @@ inline int SocketOption::setso<SocketOption::SRT, int>(int socket, int /*ignored
|
||||
return srt_setsockopt(socket, 0, SRT_SOCKOPT(sym), data, (int) size);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
template<>
|
||||
inline int SocketOption::setso<SocketOption::SRT, SRT_SOCKOPT_CONFIG*>(SRT_SOCKOPT_CONFIG* obj, int /*ignored*/, int sym, const void* data, size_t size)
|
||||
{
|
||||
@@ -247,7 +247,7 @@ const SocketOption srt_options [] {
|
||||
{ "ipv6only", 0, SRTO_IPV6ONLY, SocketOption::PRE, SocketOption::INT, nullptr },
|
||||
{ "peeridletimeo", 0, SRTO_PEERIDLETIMEO, SocketOption::PRE, SocketOption::INT, nullptr },
|
||||
{ "packetfilter", 0, SRTO_PACKETFILTER, SocketOption::PRE, SocketOption::STRING, nullptr },
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
{ "groupconnect", 0, SRTO_GROUPCONNECT, SocketOption::PRE, SocketOption::INT, nullptr},
|
||||
{ "groupminstabletimeo", 0, SRTO_GROUPMINSTABLETIMEO, SocketOption::PRE, SocketOption::INT, nullptr},
|
||||
#endif
|
||||
|
||||
@@ -146,7 +146,7 @@ function(ShowProjectConfig)
|
||||
" ENABLE_CXX11: ${ENABLE_CXX11}\n"
|
||||
" ENABLE_APPS: ${ENABLE_APPS}\n"
|
||||
" ENABLE_EXAMPLES: ${ENABLE_EXAMPLES}\n"
|
||||
" ENABLE_EXPERIMENTAL_BONDING: ${ENABLE_EXPERIMENTAL_BONDING}\n"
|
||||
" ENABLE_BONDING: ${ENABLE_BONDING}\n"
|
||||
" ENABLE_TESTING: ${ENABLE_TESTING}\n"
|
||||
" ENABLE_PROFILE: ${ENABLE_PROFILE}\n"
|
||||
" ENABLE_LOGGING: ${ENABLE_LOGGING}\n"
|
||||
|
||||
+29
-29
@@ -83,7 +83,7 @@ using namespace srt::sync;
|
||||
|
||||
void srt::CUDTSocket::construct()
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
m_GroupOf = NULL;
|
||||
m_GroupMemberData = NULL;
|
||||
#endif
|
||||
@@ -356,7 +356,7 @@ SRTSOCKET srt::CUDTUnited::generateSocketID(bool for_group)
|
||||
{
|
||||
enterCS(m_GlobControlLock);
|
||||
const bool exists =
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
for_group
|
||||
? m_Groups.count(sockval | SRTGROUP_MASK)
|
||||
:
|
||||
@@ -658,7 +658,7 @@ int srt::CUDTUnited::newConnection(const SRTSOCKET listen,
|
||||
// could be requested deletion in the meantime. This will hold any possible
|
||||
// removal from group and resetting m_GroupOf field.
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (ns->m_GroupOf)
|
||||
{
|
||||
// XXX this might require another check of group type.
|
||||
@@ -814,7 +814,7 @@ ERR_ROLLBACK:
|
||||
{
|
||||
ScopedLock cg(m_GlobControlLock);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (ns->m_GroupOf)
|
||||
{
|
||||
HLOGC(smlog.Debug,
|
||||
@@ -864,7 +864,7 @@ int srt::CUDTUnited::installConnectHook(const SRTSOCKET u, srt_connect_callback_
|
||||
{
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
GroupKeeper k(*this, u, ERH_THROW);
|
||||
@@ -1133,7 +1133,7 @@ SRTSOCKET srt::CUDTUnited::accept(const SRTSOCKET listen, sockaddr* pw_addr, int
|
||||
// Check if LISTENER has the SRTO_GROUPCONNECT flag set,
|
||||
// and the already accepted socket has successfully joined
|
||||
// the mirror group. If so, RETURN THE GROUP ID, not the socket ID.
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (ls->core().m_config.iGroupConnect == 1 && s->m_GroupOf)
|
||||
{
|
||||
// Put a lock to protect the group against accidental deletion
|
||||
@@ -1192,7 +1192,7 @@ int srt::CUDTUnited::connect(SRTSOCKET u, const sockaddr* srcname, const sockadd
|
||||
if (target_addr.len == 0)
|
||||
throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Check affiliation of the socket. It's now allowed for it to be
|
||||
// a group or socket. For a group, add automatically a socket to
|
||||
// the group.
|
||||
@@ -1226,7 +1226,7 @@ int srt::CUDTUnited::connect(const SRTSOCKET u, const sockaddr* name, int namele
|
||||
if (target_addr.len == 0)
|
||||
throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Check affiliation of the socket. It's now allowed for it to be
|
||||
// a group or socket. For a group, add automatically a socket to
|
||||
// the group.
|
||||
@@ -1250,7 +1250,7 @@ int srt::CUDTUnited::connect(const SRTSOCKET u, const sockaddr* name, int namele
|
||||
return connectIn(s, target_addr, forced_isn);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int srt::CUDTUnited::singleMemberConnect(CUDTGroup* pg, SRT_SOCKGROUPCONFIG* gd)
|
||||
{
|
||||
int gstat = groupConnect(pg, gd, 1);
|
||||
@@ -1878,7 +1878,7 @@ int srt::CUDTUnited::connectIn(CUDTSocket* s, const sockaddr_any& target_addr, i
|
||||
|
||||
int srt::CUDTUnited::close(const SRTSOCKET u)
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
GroupKeeper k(*this, u, ERH_THROW);
|
||||
@@ -1894,7 +1894,7 @@ int srt::CUDTUnited::close(const SRTSOCKET u)
|
||||
return close(s);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
void srt::CUDTUnited::deleteGroup(CUDTGroup* g)
|
||||
{
|
||||
using srt_logging::gmlog;
|
||||
@@ -2008,7 +2008,7 @@ int srt::CUDTUnited::close(CUDTSocket* s)
|
||||
s = i->second;
|
||||
s->setClosed();
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (s->m_GroupOf)
|
||||
{
|
||||
HLOGC(smlog.Debug,
|
||||
@@ -2334,7 +2334,7 @@ int srt::CUDTUnited::epoll_clear_usocks(int eid)
|
||||
int srt::CUDTUnited::epoll_add_usock(const int eid, const SRTSOCKET u, const int* events)
|
||||
{
|
||||
int ret = -1;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
GroupKeeper k(*this, u, ERH_THROW);
|
||||
@@ -2405,7 +2405,7 @@ int srt::CUDTUnited::epoll_remove_socket_INTERNAL(const int eid, CUDTSocket* s)
|
||||
return epoll_remove_entity(eid, &s->core());
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int srt::CUDTUnited::epoll_remove_group_INTERNAL(const int eid, CUDTGroup* g)
|
||||
{
|
||||
return epoll_remove_entity(eid, g);
|
||||
@@ -2416,7 +2416,7 @@ int srt::CUDTUnited::epoll_remove_usock(const int eid, const SRTSOCKET u)
|
||||
{
|
||||
CUDTSocket* s = 0;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
CUDTGroup* g = 0;
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
@@ -2485,7 +2485,7 @@ srt::CUDTSocket* srt::CUDTUnited::locateSocket_LOCKED(SRTSOCKET u)
|
||||
return i->second;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
srt::CUDTGroup* srt::CUDTUnited::locateAcquireGroup(SRTSOCKET u, ErrorHandling erh)
|
||||
{
|
||||
ScopedLock cg(m_GlobControlLock);
|
||||
@@ -2545,7 +2545,7 @@ void srt::CUDTUnited::checkBrokenSockets()
|
||||
{
|
||||
ScopedLock cg(m_GlobControlLock);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
vector<SRTSOCKET> delgids;
|
||||
|
||||
for (groups_t::iterator i = m_ClosedGroups.begin(); i != m_ClosedGroups.end(); ++i)
|
||||
@@ -2610,7 +2610,7 @@ void srt::CUDTUnited::checkBrokenSockets()
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (s->m_GroupOf)
|
||||
{
|
||||
LOGC(smlog.Note,
|
||||
@@ -2707,7 +2707,7 @@ void srt::CUDTUnited::removeSocket(const SRTSOCKET u)
|
||||
if (rn && rn->m_bOnList)
|
||||
return;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (s->m_GroupOf)
|
||||
{
|
||||
HLOGC(smlog.Debug,
|
||||
@@ -3117,7 +3117,7 @@ void* srt::CUDTUnited::garbageCollect(void* p)
|
||||
CUDTSocket* s = i->second;
|
||||
s->breakSocket_LOCKED();
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (s->m_GroupOf)
|
||||
{
|
||||
HLOGC(smlog.Debug,
|
||||
@@ -3217,7 +3217,7 @@ srt::CUDT::APIError::APIError(CodeMajor mj, CodeMinor mn, int syserr)
|
||||
SetThreadLocalError(CUDTException(mj, mn, syserr));
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// This is an internal function; 'type' should be pre-checked if it has a correct value.
|
||||
// This doesn't have argument of GroupType due to header file conflicts.
|
||||
|
||||
@@ -3485,7 +3485,7 @@ int srt::CUDT::connect(SRTSOCKET u, const sockaddr* name, const sockaddr* tname,
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int srt::CUDT::connectLinks(SRTSOCKET grp, SRT_SOCKGROUPCONFIG targets[], int arraysize)
|
||||
{
|
||||
if (arraysize <= 0)
|
||||
@@ -3601,7 +3601,7 @@ int srt::CUDT::getsockopt(SRTSOCKET u, int, SRT_SOCKOPT optname, void* pw_optval
|
||||
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
CUDTUnited::GroupKeeper k(uglobal(), u, CUDTUnited::ERH_THROW);
|
||||
@@ -3632,7 +3632,7 @@ int srt::CUDT::setsockopt(SRTSOCKET u, int, SRT_SOCKOPT optname, const void* opt
|
||||
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
CUDTUnited::GroupKeeper k(uglobal(), u, CUDTUnited::ERH_THROW);
|
||||
@@ -3677,7 +3677,7 @@ int srt::CUDT::sendmsg2(SRTSOCKET u, const char* buf, int len, SRT_MSGCTRL& w_m)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
CUDTUnited::GroupKeeper k(uglobal(), u, CUDTUnited::ERH_THROW);
|
||||
@@ -3721,7 +3721,7 @@ int srt::CUDT::recvmsg2(SRTSOCKET u, char* buf, int len, SRT_MSGCTRL& w_m)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
{
|
||||
CUDTUnited::GroupKeeper k(uglobal(), u, CUDTUnited::ERH_THROW);
|
||||
@@ -4058,7 +4058,7 @@ srt::CUDTException& srt::CUDT::getlasterror()
|
||||
|
||||
int srt::CUDT::bstats(SRTSOCKET u, CBytePerfMon* perf, bool clear, bool instantaneous)
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (u & SRTGROUP_MASK)
|
||||
return groupsockbstats(u, perf, clear);
|
||||
#endif
|
||||
@@ -4080,7 +4080,7 @@ int srt::CUDT::bstats(SRTSOCKET u, CBytePerfMon* perf, bool clear, bool instanta
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int srt::CUDT::groupsockbstats(SRTSOCKET u, CBytePerfMon* perf, bool clear)
|
||||
{
|
||||
try
|
||||
@@ -4136,7 +4136,7 @@ SRT_SOCKSTATUS srt::CUDT::getsockstate(SRTSOCKET u)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (isgroup(u))
|
||||
{
|
||||
CUDTUnited::GroupKeeper k(uglobal(), u, CUDTUnited::ERH_THROW);
|
||||
|
||||
+10
-10
@@ -64,7 +64,7 @@ modified by
|
||||
#include "epoll.h"
|
||||
#include "handshake.h"
|
||||
#include "core.h"
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
#include "group.h"
|
||||
#endif
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
, m_SocketID(0)
|
||||
, m_ListenSocket(0)
|
||||
, m_PeerID(0)
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
, m_GroupMemberData()
|
||||
, m_GroupOf()
|
||||
#endif
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
, m_SocketID(0)
|
||||
, m_ListenSocket(0)
|
||||
, m_PeerID(0)
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
, m_GroupMemberData()
|
||||
, m_GroupOf()
|
||||
#endif
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
SRTSOCKET m_ListenSocket; //< ID of the listener socket; 0 means this is an independent socket
|
||||
|
||||
SRTSOCKET m_PeerID; //< peer socket ID
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
groups::SocketData* m_GroupMemberData; //< Pointer to group member data, or NULL if not a group member
|
||||
CUDTGroup* m_GroupOf; //< Group this socket is a member of, or NULL if it isn't
|
||||
#endif
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
int connect(SRTSOCKET u, const sockaddr* srcname, const sockaddr* tarname, int tarlen);
|
||||
int connect(const SRTSOCKET u, const sockaddr* name, int namelen, int32_t forced_isn);
|
||||
int connectIn(CUDTSocket* s, const sockaddr_any& target, int32_t forced_isn);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int groupConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG targets[], int arraysize);
|
||||
int singleMemberConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG* target);
|
||||
#endif
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
template <class EntityType>
|
||||
int epoll_remove_entity(const int eid, EntityType* ent);
|
||||
int epoll_remove_socket_INTERNAL(const int eid, CUDTSocket* ent);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
int epoll_remove_group_INTERNAL(const int eid, CUDTGroup* ent);
|
||||
#endif
|
||||
int epoll_remove_ssock(const int eid, const SYSSOCKET s);
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
int32_t epoll_set(const int eid, int32_t flags);
|
||||
int epoll_release(const int eid);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// [[using locked(m_GlobControlLock)]]
|
||||
CUDTGroup& addGroup(SRTSOCKET id, SRT_GROUP_TYPE type)
|
||||
{
|
||||
@@ -377,7 +377,7 @@ private:
|
||||
typedef std::map<SRTSOCKET, CUDTSocket*> sockets_t; // stores all the socket structures
|
||||
sockets_t m_Sockets;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
typedef std::map<SRTSOCKET, CUDTGroup*> groups_t;
|
||||
groups_t m_Groups;
|
||||
#endif
|
||||
@@ -402,7 +402,7 @@ private:
|
||||
CUDTSocket* locateSocket_LOCKED(SRTSOCKET u);
|
||||
CUDTSocket* locatePeer(const sockaddr_any& peer, const SRTSOCKET id, int32_t isn);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
CUDTGroup* locateAcquireGroup(SRTSOCKET u, ErrorHandling erh = ERH_RETURN);
|
||||
CUDTGroup* acquireSocketsGroup(CUDTSocket* s);
|
||||
|
||||
@@ -467,7 +467,7 @@ private:
|
||||
static void* garbageCollect(void*);
|
||||
|
||||
sockets_t m_ClosedSockets; // temporarily store closed sockets
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
groups_t m_ClosedGroups;
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -515,7 +515,7 @@ std::string SockStatusStr(SRT_SOCKSTATUS s)
|
||||
return names.names[int(s)-1];
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
std::string MemberStatusStr(SRT_MEMBERSTATUS s)
|
||||
{
|
||||
if (int(s) < int(SRT_GST_PENDING) || int(s) > int(SRT_GST_BROKEN))
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ modified by
|
||||
namespace srt_logging
|
||||
{
|
||||
std::string SockStatusStr(SRT_SOCKSTATUS s);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
std::string MemberStatusStr(SRT_MEMBERSTATUS s);
|
||||
#endif
|
||||
}
|
||||
|
||||
+46
-46
@@ -197,7 +197,7 @@ struct SrtOptionAction
|
||||
#ifdef SRT_ENABLE_BINDTODEVICE
|
||||
flags[SRTO_BINDTODEVICE] = SRTO_R_PREBIND;
|
||||
#endif
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
flags[SRTO_GROUPCONNECT] = SRTO_R_PRE;
|
||||
flags[SRTO_GROUPMINSTABLETIMEO]= SRTO_R_PRE;
|
||||
#endif
|
||||
@@ -309,7 +309,7 @@ srt::CUDT::CUDT(CUDTSocket* parent): m_parent(parent)
|
||||
(void)SRT_DEF_VERSION;
|
||||
|
||||
// Runtime fields
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
m_HSGroupType = SRT_GTYPE_UNDEFINED;
|
||||
#endif
|
||||
m_bTLPktDrop = true; // Too-late Packet Drop
|
||||
@@ -766,7 +766,7 @@ void srt::CUDT::getOpt(SRT_SOCKOPT optName, void *optval, int &optlen)
|
||||
*(int*)optval = (int)m_config.uKmPreAnnouncePkt;
|
||||
break;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
case SRTO_GROUPCONNECT:
|
||||
optlen = sizeof (int);
|
||||
*(int*)optval = m_config.iGroupConnect;
|
||||
@@ -817,7 +817,7 @@ void srt::CUDT::getOpt(SRT_SOCKOPT optName, void *optval, int &optlen)
|
||||
}
|
||||
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRT_ERRNO srt::CUDT::applyMemberConfigObject(const SRT_SocketOptionObject& opt)
|
||||
{
|
||||
SRT_SOCKOPT this_opt = SRTO_VERSION;
|
||||
@@ -1266,7 +1266,7 @@ size_t srt::CUDT::fillHsExtConfigString(uint32_t* pcmdspec, int cmd, const strin
|
||||
return wordsize;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// [[using locked(m_parent->m_ControlLock)]]
|
||||
// [[using locked(s_UDTUnited.m_GlobControlLock)]]
|
||||
size_t srt::CUDT::fillHsExtGroup(uint32_t* pcmdspec)
|
||||
@@ -1559,7 +1559,7 @@ bool srt::CUDT::createSrtHandshake(
|
||||
logext << ",KMX";
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool have_group = false;
|
||||
|
||||
// Note: this is done without locking because we have the following possibilities:
|
||||
@@ -1673,7 +1673,7 @@ bool srt::CUDT::createSrtHandshake(
|
||||
<< " filter size=" << ra_size << " space left: " << (total_ra_size - offset));
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Note that this will fire in both cases:
|
||||
// - When the group has been set by the user on a socket (or socket was created as a part of the group),
|
||||
// and the handshake request is to be sent with informing the peer that this conenction belongs to a group
|
||||
@@ -2791,7 +2791,7 @@ bool srt::CUDT::interpretSrtHandshake(const CHandShake& hs,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
else if ( cmd == SRT_CMD_GROUP )
|
||||
{
|
||||
// Note that this will fire in both cases:
|
||||
@@ -2869,7 +2869,7 @@ bool srt::CUDT::interpretSrtHandshake(const CHandShake& hs,
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// m_GroupOf and locking info: NULL check won't hurt here. If the group
|
||||
// was deleted in the meantime, it will be found out later anyway and result with error.
|
||||
if (m_SrtHsSide == HSD_INITIATOR && m_parent->m_GroupOf)
|
||||
@@ -2972,7 +2972,7 @@ bool srt::CUDT::checkApplyFilterConfig(const std::string &confstr)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool srt::CUDT::interpretGroup(const int32_t groupdata[], size_t data_size SRT_ATR_UNUSED, int hsreq_type_cmd SRT_ATR_UNUSED)
|
||||
{
|
||||
// `data_size` isn't checked because we believe it's checked earlier.
|
||||
@@ -3139,7 +3139,7 @@ bool srt::CUDT::interpretGroup(const int32_t groupdata[], size_t data_size SRT_A
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// NOTE: This function is called only in one place and it's done
|
||||
// exclusively on the listener side (HSD_RESPONDER, HSv5+).
|
||||
|
||||
@@ -4577,7 +4577,7 @@ EConnectStatus srt::CUDT::postConnect(const CPacket* pResponse, bool rendezvous,
|
||||
bool have_group = false;
|
||||
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
ScopedLock cl (uglobal().m_GlobControlLock);
|
||||
CUDTGroup* g = m_parent->m_GroupOf;
|
||||
if (g)
|
||||
@@ -4683,7 +4683,7 @@ EConnectStatus srt::CUDT::postConnect(const CPacket* pResponse, bool rendezvous,
|
||||
CIPAddress::pton((s->m_SelfAddr), s->core().m_piSelfIP, m_PeerAddr);
|
||||
|
||||
//int token = -1;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
{
|
||||
ScopedLock cl (uglobal().m_GlobControlLock);
|
||||
CUDTGroup* g = m_parent->m_GroupOf;
|
||||
@@ -5155,7 +5155,7 @@ void * srt::CUDT::tsbpd(void* param)
|
||||
|
||||
THREAD_STATE_INIT("SRT:TsbPd");
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Make the TSBPD thread a "client" of the group,
|
||||
// which will ensure that the group will not be physically
|
||||
// deleted until this thread exits.
|
||||
@@ -5172,7 +5172,7 @@ void * srt::CUDT::tsbpd(void* param)
|
||||
{
|
||||
steady_clock::time_point tsNextDelivery; // Next packet delivery time
|
||||
bool rxready = false;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool shall_update_group = false;
|
||||
#endif
|
||||
|
||||
@@ -5195,7 +5195,7 @@ void * srt::CUDT::tsbpd(void* param)
|
||||
if (info.seq_gap)
|
||||
{
|
||||
const int iDropCnt SRT_ATR_UNUSED = self->rcvDropTooLateUpTo(info.seqno);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
shall_update_group = true;
|
||||
#endif
|
||||
|
||||
@@ -5234,7 +5234,7 @@ void * srt::CUDT::tsbpd(void* param)
|
||||
* Set EPOLL_IN to wakeup any thread waiting on epoll
|
||||
*/
|
||||
self->uglobal().m_EPoll.update_events(self->m_SocketID, self->m_sPollID, SRT_EPOLL_IN, true);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// If this is NULL, it means:
|
||||
// - the socket never was a group member
|
||||
// - the socket was a group member, but:
|
||||
@@ -5385,7 +5385,7 @@ void * srt::CUDT::tsbpd(void *param)
|
||||
|
||||
THREAD_STATE_INIT("SRT:TsbPd");
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Make the TSBPD thread a "client" of the group,
|
||||
// which will ensure that the group will not be physically
|
||||
// deleted until this thread exits.
|
||||
@@ -5404,7 +5404,7 @@ void * srt::CUDT::tsbpd(void *param)
|
||||
steady_clock::time_point tsbpdtime;
|
||||
bool rxready = false;
|
||||
int32_t rcv_base_seq = SRT_SEQNO_NONE;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool shall_update_group = false;
|
||||
if (gkeeper.group)
|
||||
{
|
||||
@@ -5454,7 +5454,7 @@ void * srt::CUDT::tsbpd(void *param)
|
||||
self->m_pRcvBuffer->skipData(seqlen);
|
||||
|
||||
self->m_iRcvLastSkipAck = skiptoseqno;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
shall_update_group = true;
|
||||
#endif
|
||||
|
||||
@@ -5508,7 +5508,7 @@ void * srt::CUDT::tsbpd(void *param)
|
||||
* Set EPOLL_IN to wakeup any thread waiting on epoll
|
||||
*/
|
||||
self->uglobal().m_EPoll.update_events(self->m_SocketID, self->m_sPollID, SRT_EPOLL_IN, true);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// If this is NULL, it means:
|
||||
// - the socket never was a group member
|
||||
// - the socket was a group member, but:
|
||||
@@ -5782,7 +5782,7 @@ void srt::CUDT::acceptAndRespond(const sockaddr_any& agent, const sockaddr_any&
|
||||
bool have_group = false;
|
||||
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
ScopedLock cl (uglobal().m_GlobControlLock);
|
||||
CUDTGroup* g = m_parent->m_GroupOf;
|
||||
if (g)
|
||||
@@ -6434,7 +6434,7 @@ int srt::CUDT::sndDropTooLate()
|
||||
HLOGC(aslog.Debug, log << "SND-DROP: %(" << realack << "-" << m_iSndCurrSeqNo << ") n="
|
||||
<< dpkts << "pkt " << dbytes << "B, span=" << buffdelay_ms << " ms, FIRST #" << first_msgno);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// This is done with a presumption that the group
|
||||
// exists and if this is not NULL, it means that this
|
||||
// function was called with locked m_GroupLock, as sendmsg2
|
||||
@@ -6673,7 +6673,7 @@ int srt::CUDT::sendmsg2(const char *data, int len, SRT_MSGCTRL& w_mctrl)
|
||||
IF_HEAVY_LOGGING(steady_clock::time_point ts_srctime =
|
||||
steady_clock::time_point() + microseconds_from(w_mctrl.srctime));
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Check if seqno has been set, in case when this is a group sender.
|
||||
// If the sequence is from the past towards the "next sequence",
|
||||
// simply return the size, pretending that it has been sent.
|
||||
@@ -6780,7 +6780,7 @@ int srt::CUDT::recvmsg2(char* data, int len, SRT_MSGCTRL& w_mctrl)
|
||||
// Check if the socket is a member of a receiver group.
|
||||
// If so, then reading by receiveMessage is disallowed.
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (m_parent->m_GroupOf && m_parent->m_GroupOf->isGroupReceiver())
|
||||
{
|
||||
LOGP(arlog.Error, "recv*: This socket is a receiver group member. Use group ID, NOT socket ID.");
|
||||
@@ -7735,7 +7735,7 @@ void srt::CUDT::ackDataUpTo(int32_t ack)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
#if ENABLE_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
void srt::CUDT::dropToGroupRecvBase() {
|
||||
int32_t group_recv_base = SRT_SEQNO_NONE;
|
||||
if (m_parent->m_GroupOf)
|
||||
@@ -7962,7 +7962,7 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)
|
||||
string reason = "first lost"; // just for "a reason" of giving particular % for ACK
|
||||
#endif
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
#if ENABLE_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
dropToGroupRecvBase();
|
||||
#endif
|
||||
|
||||
@@ -8009,7 +8009,7 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)
|
||||
{
|
||||
ackDataUpTo(ack);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
#if ENABLE_NEW_RCVBUFFER
|
||||
const int32_t group_read_seq = m_pRcvBuffer->getFirstReadablePacketInfo(steady_clock::now()).seqno;
|
||||
#else
|
||||
@@ -8019,7 +8019,7 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)
|
||||
|
||||
InvertedLock un_bufflock (m_RcvBufferLock);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// This actually should be done immediately after the ACK pointers were
|
||||
// updated in this socket, but it can't be done inside this function due
|
||||
// to being run under a lock.
|
||||
@@ -8100,7 +8100,7 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)
|
||||
uglobal().m_EPoll.update_events(m_SocketID, m_sPollID, SRT_EPOLL_IN, true);
|
||||
}
|
||||
}
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (group_read_seq != SRT_SEQNO_NONE && m_parent->m_GroupOf)
|
||||
{
|
||||
// See above explanation for double-checking
|
||||
@@ -8213,7 +8213,7 @@ int srt::CUDT::sendCtrlAck(CPacket& ctrlpkt, int size)
|
||||
|
||||
void srt::CUDT::updateSndLossListOnACK(int32_t ackdata_seqno)
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// This is for the call of CSndBuffer::getMsgNoAt that returns
|
||||
// this value as a notfound-trap.
|
||||
int32_t msgno_at_last_acked_seq = SRT_MSGNO_CONTROL;
|
||||
@@ -8233,7 +8233,7 @@ void srt::CUDT::updateSndLossListOnACK(int32_t ackdata_seqno)
|
||||
// update sending variables
|
||||
m_iSndLastDataAck = ackdata_seqno;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (is_group)
|
||||
{
|
||||
// Get offset-1 because 'offset' points actually to past-the-end
|
||||
@@ -8257,7 +8257,7 @@ void srt::CUDT::updateSndLossListOnACK(int32_t ackdata_seqno)
|
||||
CGlobEvent::triggerEvent();
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (is_group)
|
||||
{
|
||||
// m_RecvAckLock is ordered AFTER m_GlobControlLock, so this can only
|
||||
@@ -8408,7 +8408,7 @@ void srt::CUDT::processCtrlAck(const CPacket &ctrlpkt, const steady_clock::time_
|
||||
// END of the new code with TLPKTDROP
|
||||
//
|
||||
leaveCS(m_RecvAckLock);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (m_parent->m_GroupOf)
|
||||
{
|
||||
ScopedLock glock (uglobal().m_GlobControlLock);
|
||||
@@ -8622,7 +8622,7 @@ void srt::CUDT::processCtrlAckAck(const CPacket& ctrlpkt, const time_point& tsAr
|
||||
if (m_config.bDriftTracer)
|
||||
{
|
||||
const bool drift_updated SRT_ATR_UNUSED = m_pRcvBuffer->addRcvTsbPdDriftSample(ctrlpkt.getMsgTimeStamp(), rtt);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (drift_updated && m_parent->m_GroupOf)
|
||||
{
|
||||
ScopedLock glock(uglobal().m_GlobControlLock);
|
||||
@@ -9146,7 +9146,7 @@ void srt::CUDT::updateAfterSrtHandshake(int hsv)
|
||||
// instance, through either HSREQ or HSRSP.
|
||||
#if ENABLE_HEAVY_LOGGING
|
||||
const char* hs_side[] = { "DRAW", "INITIATOR", "RESPONDER" };
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
string grpspec;
|
||||
|
||||
if (m_parent->m_GroupOf)
|
||||
@@ -9617,7 +9617,7 @@ bool srt::CUDT::packUniqueData(CPacket& w_packet, time_point& w_origintime)
|
||||
// only override extraction sequence with scheduling sequence in group mode.
|
||||
m_iSndCurrSeqNo = CSeqNo::incseq(m_iSndCurrSeqNo);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Fortunately the group itself isn't being accessed.
|
||||
if (m_parent->m_GroupOf)
|
||||
{
|
||||
@@ -9994,7 +9994,7 @@ int srt::CUDT::processData(CUnit* in_unit)
|
||||
|
||||
// [[using locked()]]; // (NOTHING locked)
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Switch to RUNNING even if there was a discrepancy, unless
|
||||
// it was long way forward.
|
||||
// XXX Important: This code is in the dead function defaultPacketArrival
|
||||
@@ -10443,7 +10443,7 @@ int srt::CUDT::processData(CUnit* in_unit)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
void srt::CUDT::updateIdleLinkFrom(CUDT* source)
|
||||
{
|
||||
ScopedLock lg (m_RecvLock);
|
||||
@@ -11420,7 +11420,7 @@ void srt::CUDT::checkTimers()
|
||||
if (currtime > m_tsLastSndTime.load() + microseconds_from(COMM_KEEPALIVE_PERIOD_US))
|
||||
{
|
||||
sendCtrl(UMSG_KEEPALIVE);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (m_parent->m_GroupOf)
|
||||
{
|
||||
ScopedLock glock (uglobal().m_GlobControlLock);
|
||||
@@ -11451,7 +11451,7 @@ void srt::CUDT::completeBrokenConnectionDependencies(int errorcode)
|
||||
{
|
||||
int token = -1;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool pending_broken = false;
|
||||
{
|
||||
ScopedLock guard_group_existence (uglobal().m_GlobControlLock);
|
||||
@@ -11479,7 +11479,7 @@ void srt::CUDT::completeBrokenConnectionDependencies(int errorcode)
|
||||
CALLBACK_CALL(m_cbConnectHook, m_SocketID, errorcode, m_PeerAddr.get(), token);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
{
|
||||
// Lock GlobControlLock in order to make sure that
|
||||
// the state if the socket having the group and the
|
||||
@@ -11637,7 +11637,7 @@ bool srt::CUDT::runAcceptHook(CUDT *acore, const sockaddr* peer, const CHandShak
|
||||
|
||||
int ext_flags = SrtHSRequest::SRT_HSTYPE_HSFLAGS::unwrap(hs.m_iType);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool have_group = false;
|
||||
SRT_GROUP_TYPE gt = SRT_GTYPE_UNDEFINED;
|
||||
#endif
|
||||
@@ -11672,7 +11672,7 @@ bool srt::CUDT::runAcceptHook(CUDT *acore, const sockaddr* peer, const CHandShak
|
||||
// Un-swap on big endian machines
|
||||
ItoHLA(((uint32_t *)target), (uint32_t *)target, blocklen);
|
||||
}
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
else if (cmd == SRT_CMD_GROUP)
|
||||
{
|
||||
uint32_t* groupdata = begin + 1;
|
||||
@@ -11696,7 +11696,7 @@ bool srt::CUDT::runAcceptHook(CUDT *acore, const sockaddr* peer, const CHandShak
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (have_group && acore->m_config.iGroupConnect == 0)
|
||||
{
|
||||
HLOGC(cnlog.Debug, log << "runAcceptHook: REJECTING connection WITHOUT calling the hook - groups not allowed");
|
||||
@@ -11728,7 +11728,7 @@ void srt::CUDT::handleKeepalive(const char* /*data*/, size_t /*size*/)
|
||||
// Here can be handled some protocol definition
|
||||
// for extra data sent through keepalive.
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (m_parent->m_GroupOf)
|
||||
{
|
||||
// Lock GlobControlLock in order to make sure that
|
||||
|
||||
+9
-9
@@ -146,7 +146,7 @@ class CCryptoControl;
|
||||
namespace srt {
|
||||
class CUDTUnited;
|
||||
class CUDTSocket;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
class CUDTGroup;
|
||||
#endif
|
||||
|
||||
@@ -190,7 +190,7 @@ public: //API
|
||||
static int startup();
|
||||
static int cleanup();
|
||||
static SRTSOCKET socket();
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
static SRTSOCKET createGroup(SRT_GROUP_TYPE);
|
||||
static SRTSOCKET getGroupOfSocket(SRTSOCKET socket);
|
||||
static int getGroupData(SRTSOCKET groupid, SRT_SOCKGROUPDATA* pdata, size_t* psize);
|
||||
@@ -204,7 +204,7 @@ public: //API
|
||||
static SRTSOCKET accept_bond(const SRTSOCKET listeners [], int lsize, int64_t msTimeOut);
|
||||
static int connect(SRTSOCKET u, const sockaddr* name, int namelen, int32_t forced_isn);
|
||||
static int connect(SRTSOCKET u, const sockaddr* name, const sockaddr* tname, int namelen);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
static int connectLinks(SRTSOCKET grp, SRT_SOCKGROUPCONFIG links [], int arraysize);
|
||||
#endif
|
||||
static int close(SRTSOCKET u);
|
||||
@@ -237,7 +237,7 @@ public: //API
|
||||
static int epoll_release(const int eid);
|
||||
static CUDTException& getlasterror();
|
||||
static int bstats(SRTSOCKET u, CBytePerfMon* perf, bool clear = true, bool instantaneous = false);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
static int groupsockbstats(SRTSOCKET u, CBytePerfMon* perf, bool clear = true);
|
||||
#endif
|
||||
static SRT_SOCKSTATUS getsockstate(SRTSOCKET u);
|
||||
@@ -510,7 +510,7 @@ private:
|
||||
CPacket& w_reqpkt, CHandShake& w_hs);
|
||||
|
||||
SRT_ATR_NODISCARD size_t fillHsExtConfigString(uint32_t *pcmdspec, int cmd, const std::string &str);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRT_ATR_NODISCARD size_t fillHsExtGroup(uint32_t *pcmdspec);
|
||||
#endif
|
||||
SRT_ATR_NODISCARD SRT_ATTR_REQUIRES(m_ConnectionLock)
|
||||
@@ -526,7 +526,7 @@ private:
|
||||
SRT_ATR_NODISCARD bool interpretSrtHandshake(const CHandShake& hs, const CPacket& hspkt, uint32_t* out_data, size_t* out_len);
|
||||
SRT_ATR_NODISCARD bool checkApplyFilterConfig(const std::string& cs);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
static CUDTGroup& newGroup(const int); // defined EXCEPTIONALLY in api.cpp for convenience reasons
|
||||
// Note: This is an "interpret" function, which should treat the tp as
|
||||
// "possibly group type" that might be out of the existing values.
|
||||
@@ -645,7 +645,7 @@ private:
|
||||
|
||||
void getOpt(SRT_SOCKOPT optName, void* optval, int& w_optlen);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
/// Applies the configuration set on the socket.
|
||||
/// Any errors in this process are reported by exception.
|
||||
SRT_ERRNO applyMemberConfigObject(const SRT_SocketOptionObject& opt);
|
||||
@@ -752,7 +752,7 @@ private: // Identification
|
||||
time_point m_tsSndHsLastTime; // Last SRT handshake request time
|
||||
int m_iSndHsRetryCnt; // SRT handshake retries left
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRT_GROUP_TYPE m_HSGroupType; // Group type about-to-be-set in the handshake
|
||||
#endif
|
||||
|
||||
@@ -1082,7 +1082,7 @@ private: // Generation and processing of packets
|
||||
/// @param seq first unacknowledged packet sequence number.
|
||||
void ackDataUpTo(int32_t seq);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
#if ENABLE_BONDING && ENABLE_NEW_RCVBUFFER
|
||||
/// @brief Drop packets in the recv buffer behind group_recv_base.
|
||||
/// Updates m_iRcvLastSkipAck if it's behind group_recv_base.
|
||||
void dropToGroupRecvBase();
|
||||
|
||||
@@ -28,7 +28,7 @@ sync.cpp
|
||||
tsbpd_time.cpp
|
||||
window.cpp
|
||||
|
||||
SOURCES - ENABLE_EXPERIMENTAL_BONDING
|
||||
SOURCES - ENABLE_BONDING
|
||||
group.cpp
|
||||
group_backup.cpp
|
||||
group_common.cpp
|
||||
@@ -78,7 +78,7 @@ tsbpd_time.h
|
||||
utilities.h
|
||||
window.h
|
||||
|
||||
PRIVATE HEADERS - ENABLE_EXPERIMENTAL_BONDING
|
||||
PRIVATE HEADERS - ENABLE_BONDING
|
||||
group.h
|
||||
group_backup.h
|
||||
group_common.h
|
||||
|
||||
@@ -690,7 +690,7 @@ struct CSrtConfigSetter<SRTO_TRANSTYPE>
|
||||
}
|
||||
};
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
template<>
|
||||
struct CSrtConfigSetter<SRTO_GROUPCONNECT>
|
||||
{
|
||||
@@ -833,7 +833,7 @@ struct CSrtConfigSetter<SRTO_PACKETFILTER>
|
||||
}
|
||||
};
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
template<>
|
||||
struct CSrtConfigSetter<SRTO_GROUPMINSTABLETIMEO>
|
||||
{
|
||||
@@ -929,7 +929,7 @@ int dispatchSet(SRT_SOCKOPT optName, CSrtConfig& co, const void* optval, int opt
|
||||
DISPATCH(SRTO_MESSAGEAPI);
|
||||
DISPATCH(SRTO_PAYLOADSIZE);
|
||||
DISPATCH(SRTO_TRANSTYPE);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
DISPATCH(SRTO_GROUPCONNECT);
|
||||
DISPATCH(SRTO_GROUPMINSTABLETIMEO);
|
||||
#endif
|
||||
@@ -954,7 +954,7 @@ int CSrtConfig::set(SRT_SOCKOPT optName, const void* optval, int optlen)
|
||||
return dispatchSet(optName, *this, optval, optlen);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool SRT_SocketOptionObject::add(SRT_SOCKOPT optname, const void* optval, size_t optlen)
|
||||
{
|
||||
// Check first if this option is allowed to be set
|
||||
|
||||
@@ -348,7 +348,7 @@ inline bool cast_optval(const void* optval, int optlen)
|
||||
|
||||
} // namespace srt
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
struct SRT_SocketOptionObject
|
||||
{
|
||||
struct SingleOption
|
||||
|
||||
+5
-5
@@ -157,8 +157,8 @@ static const int32_t SRTGROUP_MASK = (1 << 30);
|
||||
typedef int SYSSOCKET;
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_EXPERIMENTAL_BONDING
|
||||
#define ENABLE_EXPERIMENTAL_BONDING 0
|
||||
#ifndef ENABLE_BONDING
|
||||
#define ENABLE_BONDING 0
|
||||
#endif
|
||||
|
||||
typedef SYSSOCKET UDPSOCKET;
|
||||
@@ -237,7 +237,7 @@ typedef enum SRT_SOCKOPT {
|
||||
SRTO_IPV6ONLY, // IPV6_V6ONLY mode
|
||||
SRTO_PEERIDLETIMEO, // Peer-idle timeout (max time of silence heard from peer) in [ms]
|
||||
SRTO_BINDTODEVICE, // Forward the SOL_SOCKET/SO_BINDTODEVICE option on socket (pass packets only from that device)
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRTO_GROUPCONNECT, // Set on a listener to allow group connection
|
||||
SRTO_GROUPMINSTABLETIMEO, // Minimum Link Stability timeout (backup mode) in milliseconds
|
||||
SRTO_GROUPTYPE, // Group type to which an accepted socket is about to be added, available in the handshake
|
||||
@@ -765,7 +765,7 @@ SRT_API SRTSOCKET srt_create_socket(void);
|
||||
|
||||
typedef struct SRT_SocketGroupData_ SRT_SOCKGROUPDATA;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
|
||||
typedef enum SRT_GROUP_TYPE
|
||||
{
|
||||
@@ -824,7 +824,7 @@ SRT_API int srt_config_add(SRT_SOCKOPT_CONFIG* config, SRT_SOCKOPT option, const
|
||||
SRT_API SRT_SOCKGROUPCONFIG srt_prepare_endpoint(const struct sockaddr* src /*nullable*/, const struct sockaddr* adr, int namelen);
|
||||
SRT_API int srt_connect_group(SRTSOCKET group, SRT_SOCKGROUPCONFIG name [], int arraysize);
|
||||
|
||||
#endif // ENABLE_EXPERIMENTAL_BONDING
|
||||
#endif // ENABLE_BONDING
|
||||
|
||||
SRT_API int srt_bind (SRTSOCKET u, const struct sockaddr* name, int namelen);
|
||||
SRT_API int srt_bind_acquire (SRTSOCKET u, UDPSOCKET sys_udp_sock);
|
||||
|
||||
@@ -36,7 +36,7 @@ int srt_cleanup() { return CUDT::cleanup(); }
|
||||
SRTSOCKET srt_socket(int , int , int ) { return CUDT::socket(); }
|
||||
SRTSOCKET srt_create_socket() { return CUDT::socket(); }
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Group management.
|
||||
SRTSOCKET srt_create_group(SRT_GROUP_TYPE gt) { return CUDT::createGroup(gt); }
|
||||
SRTSOCKET srt_groupof(SRTSOCKET socket) { return CUDT::getGroupOfSocket(socket); }
|
||||
@@ -88,7 +88,7 @@ int srt_connect_bind(SRTSOCKET u,
|
||||
return CUDT::connect(u, source, target, target_len);
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRT_SOCKGROUPCONFIG srt_prepare_endpoint(const struct sockaddr* src, const struct sockaddr* adr, int namelen)
|
||||
{
|
||||
SRT_SOCKGROUPCONFIG data;
|
||||
|
||||
+1
-1
@@ -27,5 +27,5 @@ test_reuseaddr.cpp
|
||||
|
||||
# Tests for bonding only - put here!
|
||||
|
||||
SOURCES - ENABLE_EXPERIMENTAL_BONDING
|
||||
SOURCES - ENABLE_BONDING
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -336,4 +336,4 @@ TEST(Bonding, CloseGroupAndSocket)
|
||||
srt_cleanup();
|
||||
}
|
||||
|
||||
#endif // ENABLE_EXPERIMENTAL_BONDING
|
||||
#endif // ENABLE_BONDING
|
||||
|
||||
@@ -173,7 +173,7 @@ const OptionTestEntry g_test_matrix_options[] =
|
||||
//SRTO_EVENT
|
||||
{ SRTO_FC, "SRTO_FC", RestrictionType::PRE, sizeof(int), 32, INT32_MAX, 25600, 10000, {-1, 31} },
|
||||
//SRTO_GROUPCONNECT
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
// Max value can't exceed SRTO_PEERIDLETIMEO
|
||||
{ SRTO_GROUPMINSTABLETIMEO, "SRTO_GROUPMINSTABLETIMEO", RestrictionType::PRE, sizeof(int), 60, 5000, 60, 70, {0, -1, 50, 5001} },
|
||||
#endif
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace srt_logging
|
||||
extern Logger glog;
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
extern "C" int SrtCheckGroupHook(void* , SRTSOCKET acpsock, int , const sockaddr*, const char* )
|
||||
{
|
||||
static string gtypes[] = {
|
||||
@@ -415,7 +415,7 @@ int main( int argc, char** argv )
|
||||
o_skipflush ((optargs), " Do not wait safely 5 seconds at the end to flush buffers", "sf", "skipflush"),
|
||||
o_stoptime ((optargs), "<time[s]=0[no timeout]> Time after which the application gets interrupted", "d", "stoptime"),
|
||||
o_hook ((optargs), "<hookspec> Use listener callback of given specification (internally coded)", "hook"),
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
o_group ((optargs), "<URIs...> Using multiple SRT connections as redundancy group", "g"),
|
||||
#endif
|
||||
o_stime ((optargs), " Pass source time explicitly to SRT output", "st", "srctime", "sourcetime"),
|
||||
@@ -430,7 +430,7 @@ int main( int argc, char** argv )
|
||||
vector<string> args = params[""];
|
||||
|
||||
string source_spec, target_spec;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
vector<string> groupspec = Option<OutList>(params, vector<string>{}, o_group);
|
||||
#endif
|
||||
vector<string> source_items, target_items;
|
||||
@@ -439,7 +439,7 @@ int main( int argc, char** argv )
|
||||
{
|
||||
// You may still need help.
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if ( !groupspec.empty() )
|
||||
{
|
||||
// Check if you have something before -g and after -g.
|
||||
@@ -646,7 +646,7 @@ int main( int argc, char** argv )
|
||||
transmit_accept_hook_op = (void*)&g_reject_data;
|
||||
transmit_accept_hook_fn = &SrtRejectByCodeHook;
|
||||
}
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
else if (hargs[0] == "groupcheck")
|
||||
{
|
||||
transmit_accept_hook_fn = &SrtCheckGroupHook;
|
||||
|
||||
+10
-10
@@ -46,7 +46,7 @@ using namespace srt;
|
||||
|
||||
using srt_logging::KmStateStr;
|
||||
using srt_logging::SockStatusStr;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
using srt_logging::MemberStatusStr;
|
||||
#endif
|
||||
|
||||
@@ -220,7 +220,7 @@ void SrtCommon::InitParameters(string host, string path, map<string,string> par)
|
||||
|
||||
path = path.substr(2);
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (path == "group")
|
||||
{
|
||||
// Group specified, check type.
|
||||
@@ -551,7 +551,7 @@ void SrtCommon::AcceptNewClient()
|
||||
Error("srt_accept");
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (m_sock & SRTGROUP_MASK)
|
||||
{
|
||||
m_listener_group = true;
|
||||
@@ -666,7 +666,7 @@ void SrtCommon::Init(string host, int port, string path, map<string,string> par,
|
||||
{
|
||||
OpenClient(host, port);
|
||||
}
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
else
|
||||
{
|
||||
OpenGroupClient(); // Source data are in the fields already.
|
||||
@@ -903,7 +903,7 @@ void SrtCommon::PrepareClient()
|
||||
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
void TransmitGroupSocketConnect(void* srtcommon, SRTSOCKET sock, int error, const sockaddr* /*peer*/, int token)
|
||||
{
|
||||
SrtCommon* that = (SrtCommon*)srtcommon;
|
||||
@@ -1473,7 +1473,7 @@ SrtCommon::~SrtCommon()
|
||||
Close();
|
||||
}
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
void SrtCommon::UpdateGroupStatus(const SRT_SOCKGROUPDATA* grpdata, size_t grpdata_size)
|
||||
{
|
||||
if (!grpdata)
|
||||
@@ -2278,7 +2278,7 @@ MediaPacket SrtSource::Read(size_t chunk)
|
||||
|
||||
do
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (have_group || m_listener_group)
|
||||
{
|
||||
mctrl.grpdata = m_group_data.data();
|
||||
@@ -2380,7 +2380,7 @@ Epoll_again:
|
||||
const bool need_bw_report = transmit_bw_report && int(counter % transmit_bw_report) == transmit_bw_report - 1;
|
||||
const bool need_stats_report = transmit_stats_report && counter % transmit_stats_report == transmit_stats_report - 1;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (have_group) // Means, group with caller mode
|
||||
{
|
||||
UpdateGroupStatus(mctrl.grpdata, mctrl.grpdata_size);
|
||||
@@ -2472,7 +2472,7 @@ Epoll_again:
|
||||
}
|
||||
|
||||
SRT_MSGCTRL mctrl = srt_msgctrl_default;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
bool have_group = !m_group_nodes.empty();
|
||||
if (have_group || m_listener_group)
|
||||
{
|
||||
@@ -2499,7 +2499,7 @@ Epoll_again:
|
||||
const bool need_bw_report = transmit_bw_report && int(counter % transmit_bw_report) == transmit_bw_report - 1;
|
||||
const bool need_stats_report = transmit_stats_report && counter % transmit_stats_report == transmit_stats_report - 1;
|
||||
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (have_group)
|
||||
{
|
||||
// For listener group this is not necessary. The group information
|
||||
|
||||
@@ -70,7 +70,7 @@ protected:
|
||||
|
||||
struct Connection: ConnectionBase
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
SRT_SOCKOPT_CONFIG* options = nullptr;
|
||||
#endif
|
||||
int error = SRT_SUCCESS;
|
||||
@@ -79,7 +79,7 @@ protected:
|
||||
Connection(string h, int p): ConnectionBase(h, p) {}
|
||||
Connection(Connection&& old): ConnectionBase(old)
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
if (old.options)
|
||||
{
|
||||
options = old.options;
|
||||
@@ -89,7 +89,7 @@ protected:
|
||||
}
|
||||
~Connection()
|
||||
{
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
srt_delete_config(options);
|
||||
#endif
|
||||
}
|
||||
@@ -107,7 +107,7 @@ protected:
|
||||
vector<Connection> m_group_nodes;
|
||||
string m_group_type;
|
||||
string m_group_config;
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
vector<SRT_SOCKGROUPDATA> m_group_data;
|
||||
#ifdef SRT_OLD_APP_READER
|
||||
int32_t m_group_seqno = -1;
|
||||
@@ -157,7 +157,7 @@ protected:
|
||||
virtual int ConfigurePre(SRTSOCKET sock);
|
||||
|
||||
void OpenClient(string host, int port);
|
||||
#if ENABLE_EXPERIMENTAL_BONDING
|
||||
#if ENABLE_BONDING
|
||||
void OpenGroupClient();
|
||||
#endif
|
||||
void PrepareClient();
|
||||
|
||||
Reference in New Issue
Block a user