You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
4.0 KiB
126 lines
4.0 KiB
Index: srtcore/api.h |
|
--- srtcore/api.h.orig 2021-10-01 14:25:02.000000000 +0200 |
|
+++ srtcore/api.h 2021-10-04 19:54:01.042770000 +0200 |
|
@@ -65,7 +65,7 @@ |
|
#include "epoll.h" |
|
#include "handshake.h" |
|
#include "core.h" |
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
#include "group.h" |
|
#endif |
|
|
|
@@ -86,7 +86,7 @@ |
|
, m_SocketID(0) |
|
, m_ListenSocket(0) |
|
, m_PeerID(0) |
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
, m_GroupMemberData() |
|
, m_GroupOf() |
|
#endif |
|
@@ -105,7 +105,7 @@ |
|
, m_SocketID(0) |
|
, m_ListenSocket(0) |
|
, m_PeerID(0) |
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
, m_GroupMemberData() |
|
, m_GroupOf() |
|
#endif |
|
@@ -139,7 +139,7 @@ |
|
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 |
|
+#ifdef ENABLE_EXPERIMENTAL_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 @@ |
|
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 |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
int groupConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG targets [], int arraysize); |
|
int singleMemberConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG* target); |
|
#endif |
|
@@ -300,7 +300,7 @@ |
|
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 |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
int epoll_remove_group_INTERNAL(const int eid, CUDTGroup* ent); |
|
#endif |
|
int epoll_remove_ssock(const int eid, const SYSSOCKET s); |
|
@@ -309,7 +309,7 @@ |
|
int32_t epoll_set(const int eid, int32_t flags); |
|
int epoll_release(const int eid); |
|
|
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
// [[using locked(m_GlobControlLock)]] |
|
CUDTGroup& addGroup(SRTSOCKET id, SRT_GROUP_TYPE type) |
|
{ |
|
@@ -373,7 +373,7 @@ |
|
typedef std::map<SRTSOCKET, CUDTSocket*> sockets_t; // stores all the socket structures |
|
sockets_t m_Sockets; |
|
|
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
typedef std::map<SRTSOCKET, CUDTGroup*> groups_t; |
|
groups_t m_Groups; |
|
#endif |
|
@@ -397,7 +397,7 @@ |
|
CUDTSocket* locateSocket_LOCKED(SRTSOCKET u); |
|
CUDTSocket* locatePeer(const sockaddr_any& peer, const SRTSOCKET id, int32_t isn); |
|
|
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
CUDTGroup* locateAcquireGroup(SRTSOCKET u, ErrorHandling erh = ERH_RETURN); |
|
CUDTGroup* acquireSocketsGroup(CUDTSocket* s); |
|
|
|
@@ -463,7 +463,7 @@ |
|
static void* garbageCollect(void*); |
|
|
|
sockets_t m_ClosedSockets; // temporarily store closed sockets |
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
groups_t m_ClosedGroups; |
|
#endif |
|
|
|
Index: srtcore/platform_sys.h |
|
--- srtcore/platform_sys.h.orig 2021-10-01 14:25:02.000000000 +0200 |
|
+++ srtcore/platform_sys.h 2021-10-04 19:50:38.742411000 +0200 |
|
@@ -74,6 +74,17 @@ |
|
#endif |
|
|
|
#ifdef BSD |
|
+ |
|
+#ifdef SRT_IMPORT_EVENT |
|
+ #include <sys/types.h> |
|
+ #include <sys/event.h> |
|
+ #include <sys/time.h> |
|
+ #include <unistd.h> |
|
+#endif |
|
+ |
|
+#endif |
|
+ |
|
+#ifdef BSD |
|
#ifdef SRT_IMPORT_EVENT |
|
#include <sys/types.h> |
|
#include <sys/event.h> |
|
Index: srtcore/srt.h |
|
--- srtcore/srt.h.orig 2021-10-01 14:25:02.000000000 +0200 |
|
+++ srtcore/srt.h 2021-10-04 19:50:38.742627000 +0200 |
|
@@ -769,7 +769,7 @@ |
|
|
|
typedef struct SRT_SocketGroupData_ SRT_SOCKGROUPDATA; |
|
|
|
-#if ENABLE_EXPERIMENTAL_BONDING |
|
+#ifdef ENABLE_EXPERIMENTAL_BONDING |
|
|
|
typedef enum SRT_GROUP_TYPE |
|
{
|
|
|