A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Haivision/srt/commit/445a60c19cbda6dbf24087910f5b868d90a6bddc below:

placing SRT classes inside 'srt' namespace. · Haivision/srt@445a60c · GitHub

@@ -72,6 +72,8 @@ modified by

72 72

// Please refer to structure and locking information provided in the

73 73

// docs/dev/low-level-info.md document.

74 74 75 +

namespace srt {

76 + 75 77

class CUDT;

76 78 77 79

class CUDTSocket

@@ -107,7 +109,7 @@ class CUDTSocket

107 109

/// of sockets in order to prevent other methods from accessing invalid address.

108 110

/// A timer is started and the socket will be removed after approximately

109 111

/// 1 second (see CUDTUnited::checkBrokenSockets()).

110 -

srt::sync::steady_clock::time_point m_tsClosureTimeStamp;

112 +

sync::steady_clock::time_point m_tsClosureTimeStamp;

111 113 112 114

sockaddr_any m_SelfAddr; //< local address of the socket

113 115

sockaddr_any m_PeerAddr; //< peer address of the socket

@@ -117,18 +119,18 @@ class CUDTSocket

117 119 118 120

SRTSOCKET m_PeerID; //< peer socket ID

119 121

#if ENABLE_EXPERIMENTAL_BONDING

120 -

srt::groups::SocketData* m_GroupMemberData; //< Pointer to group member data, or NULL if not a group member

122 +

groups::SocketData* m_GroupMemberData; //< Pointer to group member data, or NULL if not a group member

121 123

CUDTGroup* m_GroupOf; //< Group this socket is a member of, or NULL if it isn't

122 124

#endif

123 125 124 126

int32_t m_iISN; //< initial sequence number, used to tell different connection from same IP:port

125 127 126 128

CUDT* m_pUDT; //< pointer to the UDT entity

127 129 128 -

std::set<SRTSOCKET> m_QueuedSockets; //< set of connections waiting for accept()

130 +

std::set<SRTSOCKET> m_QueuedSockets; //< set of connections waiting for accept()

129 131 130 -

srt::sync::Condition m_AcceptCond; //< used to block "accept" call

131 -

srt::sync::Mutex m_AcceptLock; //< mutex associated to m_AcceptCond

132 +

sync::Condition m_AcceptCond; //< used to block "accept" call

133 +

sync::Mutex m_AcceptLock; //< mutex associated to m_AcceptCond

132 134 133 135

unsigned int m_uiBackLog; //< maximum number of connections in queue

134 136

@@ -143,9 +145,9 @@ class CUDTSocket

143 145

// When deleting, you simply "unsubscribe" yourself from the multiplexer, which

144 146

// will unref it and remove the list element by the iterator kept by the

145 147

// socket.

146 -

int m_iMuxID; //< multiplexer ID

148 +

int m_iMuxID; //< multiplexer ID

147 149 148 -

srt::sync::Mutex m_ControlLock; //< lock this socket exclusively for control APIs: bind/listen/connect

150 +

sync::Mutex m_ControlLock; //< lock this socket exclusively for control APIs: bind/listen/connect

149 151 150 152

CUDT& core() { return *m_pUDT; }

151 153

@@ -346,12 +348,12 @@ friend class CRendezvousQueue;

346 348

groups_t m_Groups;

347 349

#endif

348 350 349 -

srt::sync::Mutex m_GlobControlLock; // used to synchronize UDT API

351 +

sync::Mutex m_GlobControlLock; // used to synchronize UDT API

350 352 351 -

srt::sync::Mutex m_IDLock; // used to synchronize ID generation

353 +

sync::Mutex m_IDLock; // used to synchronize ID generation

352 354 353 -

SRTSOCKET m_SocketIDGenerator; // seed to generate a new unique socket ID

354 -

SRTSOCKET m_SocketIDGenerator_init; // Keeps track of the very first one

355 +

SRTSOCKET m_SocketIDGenerator; // seed to generate a new unique socket ID

356 +

SRTSOCKET m_SocketIDGenerator_init; // Keeps track of the very first one

355 357 356 358

std::map<int64_t, std::set<SRTSOCKET> > m_PeerRec;// record sockets from peers to avoid repeated connection request, int64_t = (socker_id << 30) + isn

357 359

@@ -394,7 +396,7 @@ friend class CRendezvousQueue;

394 396

// We have a guarantee that if `group` was set

395 397

// as non-NULL here, it is also acquired and will not

396 398

// be deleted until this busy flag is set back to false.

397 -

srt::sync::ScopedLock cgroup (*group->exp_groupLock());

399 +

sync::ScopedLock cgroup (*group->exp_groupLock());

398 400

group->apiRelease();

399 401

// Only now that the group lock is lifted, can the

400 402

// group be now deleted and this pointer potentially dangling

@@ -408,21 +410,21 @@ friend class CRendezvousQueue;

408 410 409 411

private:

410 412

std::map<int, CMultiplexer> m_mMultiplexer; // UDP multiplexer

411 -

srt::sync::Mutex m_MultiplexerLock;

413 +

sync::Mutex m_MultiplexerLock;

412 414 413 415

private:

414 416

CCache<CInfoBlock>* m_pCache; // UDT network information cache

415 417 416 418

private:

417 419

volatile bool m_bClosing;

418 -

srt::sync::Mutex m_GCStopLock;

419 -

srt::sync::Condition m_GCStopCond;

420 +

sync::Mutex m_GCStopLock;

421 +

sync::Condition m_GCStopCond;

420 422 421 -

srt::sync::Mutex m_InitLock;

423 +

sync::Mutex m_InitLock;

422 424

int m_iInstanceCount; // number of startup() called by application

423 425

bool m_bGCStatus; // if the GC thread is working (true)

424 426 425 -

srt::sync::CThread m_GCThread;

427 +

sync::CThread m_GCThread;

426 428

static void* garbageCollect(void*);

427 429 428 430

sockets_t m_ClosedSockets; // temporarily store closed sockets

@@ -440,4 +442,6 @@ friend class CRendezvousQueue;

440 442

CUDTUnited& operator=(const CUDTUnited&);

441 443

};

442 444 445 +

} // namespace srt

446 + 443 447

#endif


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4