worker/include/RTC/SCTP/TODO_SCTP.md
DataChunk, IDataChunkandAnyDataChunk: Add SetUserData(UserData)`.
Remove all default values of class memners in .hpp of all classes in case the constructor must give them initial value.
Lot of stuff missing in TransmissionControlBock class and I forgot to add "TODO: SCTP" in them.
dcsctp uses µs (webrtc::Timestamp::Micros()) internally, while mediasoup uses ms (DepLibUV::GetTimeMs()). When porting dcsctp timeout/duration logic, make sure to convert accordingly. Do not mix units in the same field.
Association: When transitioning to CLOSED (due to failure while connecting or closure) we should emit a new event "stcpclosed" in all DataProducers/Consumers.
When receiving SCTP RE-CONFIG, we should emit "streamclosed" in those DataProducers/DataConsumers whose stream ID have been closed.
Why the hell does DataConsumer have a RTC::SctpAssociation* sctpAssociation member?
OnAssociationFailed() and OnAssociationClosed() should report an error (if present) to JS.
Probably add many more fields in SctpOptions given to the Association in Transport.cpp.
We must remove numSctpStreams option given to router.createXxxTransport() and NumSctpStreams type. OS and MIS in numSctpStreams are just the max announced number of outbound and incoming SCTP streams, but in the new SCTP stack those should always be 65535. The max number of incoming and outgoing streams will be negotiated later with the SCTP INIT and INIT_ACK and will be the minimum of our values (65535) and the OS and MIS that the peer announces in its INIT or INIT_ACK.
sctpParameters.fbs and other FBS types (look for MIS or mis, etc).device.sctpCapabilities getter from mediasoup-client because anyway we are making up those values!Replicate retransmission_queue_test.cc of dcsctp.
When we invoke close() on a DataProducer/Consumer in server, we must end calling sctpAssociation->ResetStream([streamId]) so it sends ReConfig to peer.
In transport.dump() (maybe also in getStats()) we must properly obtain OS and MIS according to the number of SCTP streams negotiated via INIT + INIT_ACK. And if SCTP is not yet established, then... not sure.
Association::FillBuffer() we should not pass this->sctpOptions.negotiatedMaxOutboundStreams/negotiatedMaxInboundStreams but the current values.We need to pass isDataChannel to SCTP::Association constructor as we do in former SctpAssociation. Also use it in Association::FillBuffer().
Instead of having a protected sctpAssociation member in Transport, let's make Transport subclasses invoke a new method Transport::SendSctpMessage() or Transport::SendMessage() instead of directly calling this->sctpAssociation->SendSctpMessage().
Fix dataConsumer.getBufferedAmount() which in usrsctp returns the data buffered for all data consumers in the transport but now it will be per DataConsumer (SCTP stream).
DataConsumer class rename SetAssociationBufferedAmount() to SetBufferedAmount().DataConsumer class revisit SctpAssociationSendBufferFull() method.Look for "TODO: SCTP" everywhere.
Test Chrome/Canary with I-DATA (message interleaving):
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary \
--force-fieldtrials="WebRTC-DataChannelMessageInterleaving/Enabled/" \
--enable-logging=stderr \
--v=1 \