A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/Haivision/srt/commit/33c8e492a0014a8173487f89205aab82067ca4b2 below:

[core] checkNeedDrop returns the congestion state · Haivision/srt@33c8e49 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+8

-8

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+8

-8

lines changed Original file line number Diff line number Diff line change

@@ -6362,10 +6362,10 @@ int srt::CUDT::receiveBuffer(char *data, int len)

6362 6362 6363 6363

// [[using maybe_locked(CUDTGroup::m_GroupLock, m_parent->m_GroupOf != NULL)]];

6364 6364

// [[using locked(m_SendLock)]];

6365 -

void srt::CUDT::checkNeedDrop(bool& w_bCongestion)

6365 +

bool srt::CUDT::checkNeedDrop()

6366 6366

{

6367 6367

if (!m_bPeerTLPktDrop)

6368 -

return;

6368 +

return false;

6369 6369 6370 6370

if (!m_config.bMessageAPI)

6371 6371

{

@@ -6390,6 +6390,7 @@ void srt::CUDT::checkNeedDrop(bool& w_bCongestion)

6390 6390

(2 * COMM_SYN_INTERVAL_US / 1000);

6391 6391

}

6392 6392 6393 +

bool bCongestion = false;

6393 6394

if (threshold_ms && timespan_ms > threshold_ms)

6394 6395

{

6395 6396

// protect packet retransmission

@@ -6447,16 +6448,17 @@ void srt::CUDT::checkNeedDrop(bool& w_bCongestion)

6447 6448

}

6448 6449

#endif

6449 6450

}

6450 -

w_bCongestion = true;

6451 +

bCongestion = true;

6451 6452

leaveCS(m_RecvAckLock);

6452 6453

}

6453 6454

else if (timespan_ms > (m_iPeerTsbPdDelay_ms / 2))

6454 6455

{

6455 6456

HLOGC(aslog.Debug,

6456 6457

log << "cong, BYTES " << bytes << ", TMSPAN " << timespan_ms << "ms");

6457 6458 6458 -

w_bCongestion = true;

6459 +

bCongestion = true;

6459 6460

}

6461 +

return bCongestion;

6460 6462

}

6461 6463 6462 6464

int srt::CUDT::sendmsg(const char *data, int len, int msttl, bool inorder, int64_t srctime)

@@ -6473,8 +6475,6 @@ int srt::CUDT::sendmsg(const char *data, int len, int msttl, bool inorder, int64

6473 6475

// which is the only case when the m_parent->m_GroupOf is not NULL.

6474 6476

int srt::CUDT::sendmsg2(const char *data, int len, SRT_MSGCTRL& w_mctrl)

6475 6477

{

6476 -

bool bCongestion = false;

6477 - 6478 6478

// throw an exception if not connected

6479 6479

if (m_bBroken || m_bClosing)

6480 6480

throw CUDTException(MJ_CONNECTION, MN_CONNLOST, 0);

@@ -6563,7 +6563,7 @@ int srt::CUDT::sendmsg2(const char *data, int len, SRT_MSGCTRL& w_mctrl)

6563 6563 6564 6564

// checkNeedDrop(...) may lock m_RecvAckLock

6565 6565

// to modify m_pSndBuffer and m_pSndLossList

6566 -

checkNeedDrop((bCongestion));

6566 +

const bool bCongestion = checkNeedDrop();

6567 6567 6568 6568

int minlen = 1; // Minimum sender buffer space required for STREAM API

6569 6569

if (m_config.bMessageAPI)

Original file line number Diff line number Diff line change

@@ -541,7 +541,7 @@ class CUDT

541 541 542 542

void updateIdleLinkFrom(CUDT* source);

543 543 544 -

void checkNeedDrop(bool& bCongestion);

544 +

bool checkNeedDrop();

545 545 546 546

/// Connect to a UDT entity as per hs request. This will update

547 547

/// required data in the entity, then update them also in the hs structure,

You can’t perform that action at this time.


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