How to comunicate the C++ Channel with nodejs?

I know the nodejs start c++ worker by spawn and create a pipe , but the C++ Channel only create one fd. How to transport command from nodejs to C++ channel? I dont understant it . Can you help me ?

It obviously works so, may I know why do you want to know it?

Just in case, we do not help people that take code from mediasoup to build their own private / commercial forks.

Ok, Thanks! I want to create a open source project with mediasoup. so I must understand why It can work well by this method. I also wish I can contribue my power for mediasoup in further . I think the mediasoup is very great .

The mediasoup Node library communicates with each worker process it creates by exchanging JSON messages in both directions via a UnixSocket (a UnixSocket with each worker process). Just that.

thanks a lot of. I am very sorry! I confused the dev branch with V3 branch yesterday. I view Worker.js in dev branch and view handle/UnixStreamSocket in V3 branch.

In “devel” branch there is support for Windows so instead of a UnixSocket something else is used, but that’s handled by libuv in a transparent way. However, due to a bug in Node+libuv (that will be fixed in next versions of Node) we had to use two unidirectional “pipes” instead of a single bidirectional “pipe” to make it work in Windows.

I see, thank you!