Comments (1)
Usage of uv_async
stuff should be easy:
- The
SctpAssociation
class should have a newuv_async_t* uvAsyncHandle
private member. - The
SctpAssociation
class should have a new public getteruv_async_t* GetAsyncHandle()
method that returnsthis->uvAsyncHandle
. - The
SctpAssociation
should expose a public methodInitializeSyncHandle(uv_async_cb callback)
which internally should calluv_async_init(DepLibUV::GetLoop(), this->uvAsyncHandle, callback)
. - We store each
SctpAssociation
in the existingDepUsrSCTP::mapIdSctpAssociation
map (nothing new here). - In addition to that,
DepUsrSCTP::RegisterSctpAssociation
should callsctpAssociation->InitializeSyncHandle(static_cast<uv_async_cb>(xxxx))
wherexxxx
is auv_async_cb
callback that somehow runs the mutex to readdata
andlen
in a new map associated to theStcpAssociation
and callssctpAssociation->OnUsrSctpSendSctpData(data, len)
and then remove that entry from that map. Or similar. - The
onSendSctpData()
static function, once it retrieves the associatedSctpAssociation
, should callauto* uvAsyncHandle = GetAsyncHandle()
on it, and then invokeuv_async_send(uvAsyncHandle)
. - But this should only be done in Rust since in Node it's not needed at all.
That's all. Then something similar should be done in ClassInit()
to initialize usrsctp and the Checker
singleton within the thread X.
from mediasoup.
Related Issues (20)
- Memory leak HOT 6
- opus dtx incorrectly judged HOT 7
- Possible missing break in H264_SVC::ParseSingleNalu()
- Must join all XxxConsumer classes into a single one
- set MS_LOG_DEV_LEVEL 3, lead to build errors HOT 1
- #define MS_LOG_DEV_LEVEL 3, build error HOT 1
- SeqManager<T>::SeqLowerThan() crashes when used as compare function in abseil set or map (only in debug mode) HOT 24
- Use uint64_t for containers with RTP seq number as key
- arm64 prebuilt binaries are replacing x64 ones HOT 4
- test-PipeTransport.ts randomly fails HOT 2
- RtpPacket::SetPayloadLength get wrong payloadLength HOT 2
- Possible memory leak HOT 34
- DataConsumer::SendMessage cause onQueuedCallback* cb leak and DATACONSUMER_SEND have no response HOT 1
- FeedbackRtpTransport.cpp may have an overflow mistake HOT 9
- Worker crash when closing `WebRtcServer` if there are TCP connections active HOT 2
- Mediasoup worker died, exiting in 2 seconds... HOT 2
- [Rust] Error log “XXX closing failed on drop: Channel already closed”
- Add interface for RTC::Shared, Channel::ChannelNotifier and ChannelMessageRegistrator HOT 3
- [Rust] Transport with only audio producer results in server-side transport cc is not created. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediasoup.