提交 d25b2771 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

SctpAssociation: cosmetic renaming

上级 59b9636a
...@@ -101,7 +101,7 @@ namespace RTC ...@@ -101,7 +101,7 @@ namespace RTC
void OnUsrSctpReceiveSctpData( void OnUsrSctpReceiveSctpData(
uint16_t streamId, uint16_t ssn, uint32_t ppid, int flags, const uint8_t* data, size_t len); uint16_t streamId, uint16_t ssn, uint32_t ppid, int flags, const uint8_t* data, size_t len);
void OnUsrSctpReceiveSctpNotification(union sctp_notification* notification, size_t len); void OnUsrSctpReceiveSctpNotification(union sctp_notification* notification, size_t len);
void OnUsrSctpBufferedAmount(uint32_t len); void OnUsrSctpSentData(uint32_t freeBuffer);
public: public:
uintptr_t id{ 0u }; uintptr_t id{ 0u };
......
...@@ -83,7 +83,7 @@ inline static int onRecvSctpData( ...@@ -83,7 +83,7 @@ inline static int onRecvSctpData(
return 1; return 1;
} }
inline static int onBufferedAmount(struct socket* /*sock*/, uint32_t len, void* ulpInfo) inline static int onSendSctpData(struct socket* /*sock*/, uint32_t freeBuffer, void* ulpInfo)
{ {
auto* sctpAssociation = DepUsrSCTP::RetrieveSctpAssociation(reinterpret_cast<uintptr_t>(ulpInfo)); auto* sctpAssociation = DepUsrSCTP::RetrieveSctpAssociation(reinterpret_cast<uintptr_t>(ulpInfo));
...@@ -94,7 +94,7 @@ inline static int onBufferedAmount(struct socket* /*sock*/, uint32_t len, void* ...@@ -94,7 +94,7 @@ inline static int onBufferedAmount(struct socket* /*sock*/, uint32_t len, void*
return 0; return 0;
} }
sctpAssociation->OnUsrSctpBufferedAmount(len); sctpAssociation->OnUsrSctpSentData(freeBuffer);
return 1; return 1;
} }
...@@ -134,7 +134,7 @@ namespace RTC ...@@ -134,7 +134,7 @@ namespace RTC
SOCK_STREAM, SOCK_STREAM,
IPPROTO_SCTP, IPPROTO_SCTP,
onRecvSctpData, onRecvSctpData,
onBufferedAmount, onSendSctpData,
SendBufferThreshold, SendBufferThreshold,
reinterpret_cast<void*>(this->id)); reinterpret_cast<void*>(this->id));
...@@ -1018,9 +1018,9 @@ namespace RTC ...@@ -1018,9 +1018,9 @@ namespace RTC
} }
} }
void SctpAssociation::OnUsrSctpBufferedAmount(uint32_t len) void SctpAssociation::OnUsrSctpSentData(uint32_t freeBuffer)
{ {
this->sctpBufferedAmount = this->sctpSendBufferSize - len; this->sctpBufferedAmount = this->sctpSendBufferSize - freeBuffer;
this->listener->OnSctpAssociationBufferedAmount(this, this->sctpSendBufferSize); this->listener->OnSctpAssociationBufferedAmount(this, this->sctpSendBufferSize);
} }
} // namespace RTC } // namespace RTC
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论