Datachannel termination via the new DirectTransport (#409)
Fixes #400 ### Feature overview - Allow the Node application to directly send text/binary messages to `mediasoup-worker` C++ process so others can consume them using `DataConsumer`. - And vice-versa: allow the Node application to directly consume in Node messages send by `DataProducers`. ### Implementation - New `DirectTransport` (created via `router.createDirectTransport`) that uses the new `PayloadChannel` (UnixSocket pair between Node and C++) to send payload messages in both directions. - Extend `DataProducer` and `DataConsumer` classes to not just work with SCTP capable transports (`WebRtcTransport`, `PlainTransport`, `PipeTransport`) but also with the new `DirectTransport`. - In the latter, there are no "SCTP stream parameters" involved at all. - `sctpStreamParameters` are now optional in `DataProducerOptions` (just valid for `directTransport.produceData()`). - So `dataProducer/Consumer.sctpStreamParameters` getter can now return `undefined`. - Added `dataProducer/Consumer.type` getter, that can be 'sctp' or 'direct'. - `transport.consumeData()` (when in an SCTP capable transport) now accepts optional SCTP related parameters in `DataConsumerOptions` to tell mediasoup how to deliver messages to the remote SCTP endpoint: ordered?: boolean; maxPacketLifeTime?: number; maxRetransmits?: number; - `Worker`: Added a new `direct` log tag.
正在显示
lib/DirectTransport.d.ts
0 → 100644
lib/DirectTransport.d.ts.map
0 → 100644
lib/DirectTransport.js
0 → 100644
lib/PayloadChannel.d.ts
0 → 100644
lib/PayloadChannel.d.ts.map
0 → 100644
lib/PayloadChannel.js
0 → 100644
src/DirectTransport.ts
0 → 100644
src/PayloadChannel.ts
0 → 100644
test/test-DirectTransport.js
0 → 100644
请
注册
或者
登录
后发表评论