mediasoup 3.20.0 → 3.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/lib/Consumer.d.ts.map +1 -1
- package/node/lib/Consumer.js +5 -4
- package/node/lib/DataConsumer.d.ts +2 -3
- package/node/lib/DataConsumer.d.ts.map +1 -1
- package/node/lib/DataConsumer.js +10 -7
- package/node/lib/DataConsumerTypes.d.ts +5 -4
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.d.ts.map +1 -1
- package/node/lib/DataProducer.js +2 -1
- package/node/lib/PipeTransport.d.ts.map +1 -1
- package/node/lib/PipeTransport.js +5 -4
- package/node/lib/PlainTransport.d.ts.map +1 -1
- package/node/lib/PlainTransport.js +6 -5
- package/node/lib/Producer.d.ts.map +1 -1
- package/node/lib/Producer.js +4 -3
- package/node/lib/Router.js +1 -1
- package/node/lib/WebRtcTransport.d.ts.map +1 -1
- package/node/lib/WebRtcTransport.js +6 -5
- package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/degrade-request.js +124 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +102 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts +21 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts.map +1 -0
- package/node/lib/fbs/data-consumer/send-response.js +91 -0
- package/node/lib/fbs/data-consumer.d.ts +1 -0
- package/node/lib/fbs/data-consumer.d.ts.map +1 -1
- package/node/lib/fbs/data-consumer.js +4 -1
- package/node/lib/fbs/producer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/producer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/producer/degrade-request.js +124 -0
- package/node/lib/fbs/response/body.d.ts +7 -5
- package/node/lib/fbs/response/body.d.ts.map +1 -1
- package/node/lib/fbs/response/body.js +7 -3
- package/node/lib/fbs/response/response.d.ts +3 -2
- package/node/lib/fbs/response/response.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +102 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +102 -0
- package/node/lib/fbs/worker/close-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-notification.js +78 -0
- package/node/lib/fbs/worker/close-request.d.ts +18 -0
- package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-request.js +78 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-worker-notification.js +78 -0
- package/node/lib/sctpParametersTypes.d.ts +23 -0
- package/node/lib/sctpParametersTypes.d.ts.map +1 -1
- package/node/lib/test/test-Consumer.js +194 -0
- package/node/lib/test/test-DataConsumer.js +6 -0
- package/node/lib/test/test-Router.js +11 -0
- package/node/lib/test/test-werift-sctp.js +7 -0
- package/npm-scripts.mjs +2 -2
- package/package.json +7 -6
- package/worker/Makefile +5 -1
- package/worker/deps/libwebrtc/meson.build +5 -1
- package/worker/fbs/dataConsumer.fbs +4 -0
- package/worker/fbs/response.fbs +1 -0
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
- package/worker/include/Channel/ChannelMessageRegistrator.hpp +4 -3
- package/worker/include/Channel/ChannelNotification.hpp +0 -4
- package/worker/include/Channel/ChannelRequest.hpp +3 -4
- package/worker/include/DepLibSRTP.hpp +2 -2
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +2 -2
- package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
- package/worker/include/RTC/Consumer.hpp +1 -1
- package/worker/include/RTC/DataConsumer.hpp +2 -2
- package/worker/include/RTC/DtlsTransport.hpp +4 -4
- package/worker/include/RTC/ICE/IceServer.hpp +2 -2
- package/worker/include/RTC/ICE/StunPacket.hpp +34 -34
- package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
- package/worker/include/RTC/Parameters.hpp +2 -2
- package/worker/include/RTC/PipeConsumer.hpp +6 -5
- package/worker/include/RTC/PlainTransport.hpp +0 -1
- package/worker/include/RTC/PortManager.hpp +92 -12
- package/worker/include/RTC/Producer.hpp +7 -6
- package/worker/include/RTC/RTCP/Feedback.hpp +1 -2
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +2 -2
- package/worker/include/RTC/RTCP/Packet.hpp +2 -2
- package/worker/include/RTC/RTCP/Sdes.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/DependencyDescriptor.hpp +2 -1
- package/worker/include/RTC/RTP/Packet.hpp +57 -57
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +2 -2
- package/worker/include/RTC/RTP/SharedPacket.hpp +4 -4
- package/worker/include/RTC/Router.hpp +12 -11
- package/worker/include/RTC/RtcLogger.hpp +2 -2
- package/worker/include/RTC/RtpDictionaries.hpp +6 -6
- package/worker/include/RTC/RtpListener.hpp +4 -4
- package/worker/include/RTC/SCTP/association/Association.hpp +13 -13
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +2 -2
- package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +2 -2
- package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +9 -9
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +4 -4
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +24 -24
- package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +86 -86
- package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +18 -18
- package/worker/include/RTC/SCTP/packet/Packet.hpp +33 -33
- package/worker/include/RTC/SCTP/packet/Parameter.hpp +24 -24
- package/worker/include/RTC/SCTP/packet/TLV.hpp +13 -13
- package/worker/include/RTC/SCTP/packet/UserData.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +9 -9
- package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +11 -11
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +8 -8
- package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationListenerInterface.hpp +26 -26
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +7 -7
- package/worker/include/RTC/SCTP/public/Message.hpp +1 -1
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +4 -4
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +10 -10
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
- package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +39 -39
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +14 -14
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +1 -1
- package/worker/include/RTC/SctpListener.hpp +2 -2
- package/worker/include/RTC/SimulcastConsumer.hpp +2 -1
- package/worker/include/RTC/TcpServer.hpp +3 -2
- package/worker/include/RTC/Transport.hpp +8 -8
- package/worker/include/RTC/UdpSocket.hpp +3 -2
- package/worker/include/RTC/WebRtcServer.hpp +4 -5
- package/worker/include/RTC/WebRtcTransport.hpp +2 -2
- package/worker/include/Settings.hpp +3 -3
- package/worker/include/Worker.hpp +3 -3
- package/worker/include/handles/TcpServerHandle.hpp +2 -2
- package/worker/meson.build +9 -4
- package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +4 -3
- package/worker/src/Channel/ChannelNotification.cpp +5 -4
- package/worker/src/Channel/ChannelRequest.cpp +9 -6
- package/worker/src/DepLibSRTP.cpp +1 -1
- package/worker/src/RTC/AudioLevelObserver.cpp +2 -2
- package/worker/src/RTC/DataConsumer.cpp +13 -3
- package/worker/src/RTC/DataProducer.cpp +1 -1
- package/worker/src/RTC/DtlsTransport.cpp +3 -3
- package/worker/src/RTC/ICE/IceServer.cpp +1 -1
- package/worker/src/RTC/ICE/StunPacket.cpp +77 -77
- package/worker/src/RTC/PipeTransport.cpp +5 -4
- package/worker/src/RTC/PlainTransport.cpp +9 -8
- package/worker/src/RTC/PortManager.cpp +174 -114
- package/worker/src/RTC/Producer.cpp +0 -1
- package/worker/src/RTC/RTCP/Feedback.cpp +6 -6
- package/worker/src/RTC/RTCP/FeedbackPs.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsPli.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -2
- package/worker/src/RTC/RTCP/FeedbackRtp.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpSrReq.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
- package/worker/src/RTC/RTCP/Packet.cpp +2 -2
- package/worker/src/RTC/RTCP/Sdes.cpp +1 -1
- package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +2 -1
- package/worker/src/RTC/RTP/Packet.cpp +68 -68
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +3 -3
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +3 -3
- package/worker/src/RTC/RTP/RtxStream.cpp +2 -2
- package/worker/src/RTC/RTP/SharedPacket.cpp +4 -4
- package/worker/src/RTC/Router.cpp +5 -5
- package/worker/src/RTC/RtcLogger.cpp +1 -1
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +4 -4
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -3
- package/worker/src/RTC/SCTP/association/Association.cpp +100 -97
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +6 -6
- package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +3 -3
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +1 -1
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +2 -2
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +5 -5
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +52 -52
- package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +14 -14
- package/worker/src/RTC/SCTP/packet/Packet.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/Parameter.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/TLV.cpp +8 -8
- package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +8 -8
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +6 -2
- package/worker/src/RTC/TcpServer.cpp +4 -4
- package/worker/src/RTC/Transport.cpp +42 -19
- package/worker/src/RTC/UdpSocket.cpp +4 -4
- package/worker/src/RTC/WebRtcServer.cpp +8 -8
- package/worker/src/RTC/WebRtcTransport.cpp +9 -8
- package/worker/src/Settings.cpp +2 -2
- package/worker/src/lib.cpp +1 -2
- package/worker/subprojects/packagefiles/ankerl-unordered-dense/meson.build +5 -0
- package/worker/subprojects/unordered-dense.wrap +9 -0
- package/worker/tasks.py +293 -196
- package/worker/test/src/RTC/ICE/TestStunPacket.cpp +22 -22
- package/worker/test/src/RTC/ICE/iceCommon.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp +8 -8
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestSenderReport.cpp +1 -1
- package/worker/test/src/RTC/RTP/TestPacket.cpp +26 -26
- package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
- package/worker/test/src/RTC/RTP/rtpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +14 -14
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +9 -9
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +8 -8
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +11 -11
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/sctpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +3 -3
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +1 -1
- package/worker/test/src/RTC/TestNackGenerator.cpp +1 -1
- package/worker/test/src/RTC/TestPortManager.cpp +126 -0
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +2 -2
- package/worker/test/src/RTC/TestTransportTuple.cpp +3 -2
- package/worker/test/src/Utils/TestCrypto.cpp +3 -3
- package/worker/test/src/Utils/TestString.cpp +1 -1
|
@@ -11,7 +11,7 @@ namespace RTC
|
|
|
11
11
|
namespace SCTP
|
|
12
12
|
{
|
|
13
13
|
/**
|
|
14
|
-
* SCTP Incoming SSN Reset Request Parameter (
|
|
14
|
+
* SCTP Incoming SSN Reset Request Parameter (INCOMING-SSN-RESET-REQUEST)
|
|
15
15
|
* (14).
|
|
16
16
|
*
|
|
17
17
|
* @see RFC 6525.
|
|
@@ -36,7 +36,7 @@ namespace RTC
|
|
|
36
36
|
|
|
37
37
|
class IncomingSsnResetRequestParameter : public Parameter
|
|
38
38
|
{
|
|
39
|
-
// We need that
|
|
39
|
+
// We need that chunk calls protected and private methods in this class.
|
|
40
40
|
friend class Chunk;
|
|
41
41
|
|
|
42
42
|
public:
|
|
@@ -47,7 +47,7 @@ namespace RTC
|
|
|
47
47
|
* Parse a IncomingSsnResetRequestParameter.
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* `bufferLength` may exceed the exact length of the
|
|
50
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
51
51
|
*/
|
|
52
52
|
static IncomingSsnResetRequestParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ namespace RTC
|
|
|
55
55
|
* Create a IncomingSsnResetRequestParameter.
|
|
56
56
|
*
|
|
57
57
|
* @remarks
|
|
58
|
-
* `bufferLength` could be greater than the
|
|
58
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
59
59
|
*/
|
|
60
60
|
static IncomingSsnResetRequestParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
61
61
|
|
|
@@ -97,7 +97,7 @@ namespace RTC
|
|
|
97
97
|
IncomingSsnResetRequestParameter* SoftClone(const uint8_t* buffer) const final;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* We need to override this method since this
|
|
100
|
+
* We need to override this method since this chunk has a variable-length
|
|
101
101
|
* value and the fixed header doesn't have default length.
|
|
102
102
|
*/
|
|
103
103
|
size_t GetHeaderLength() const final
|
|
@@ -11,7 +11,7 @@ namespace RTC
|
|
|
11
11
|
namespace SCTP
|
|
12
12
|
{
|
|
13
13
|
/**
|
|
14
|
-
* SCTP Outgoing SSN Reset Request Parameter (
|
|
14
|
+
* SCTP Outgoing SSN Reset Request Parameter (OUTGOING-SSN-RESET-REQUEST)
|
|
15
15
|
* (13).
|
|
16
16
|
*
|
|
17
17
|
* @see RFC 6525.
|
|
@@ -40,7 +40,7 @@ namespace RTC
|
|
|
40
40
|
|
|
41
41
|
class OutgoingSsnResetRequestParameter : public Parameter
|
|
42
42
|
{
|
|
43
|
-
// We need that
|
|
43
|
+
// We need that chunk calls protected and private methods in this class.
|
|
44
44
|
friend class Chunk;
|
|
45
45
|
|
|
46
46
|
public:
|
|
@@ -51,7 +51,7 @@ namespace RTC
|
|
|
51
51
|
* Parse a OutgoingSsnResetRequestParameter.
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* `bufferLength` may exceed the exact length of the
|
|
54
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
55
55
|
*/
|
|
56
56
|
static OutgoingSsnResetRequestParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ namespace RTC
|
|
|
59
59
|
* Create a OutgoingSsnResetRequestParameter.
|
|
60
60
|
*
|
|
61
61
|
* @remarks
|
|
62
|
-
* `bufferLength` could be greater than the
|
|
62
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
63
63
|
*/
|
|
64
64
|
static OutgoingSsnResetRequestParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
65
65
|
|
|
@@ -115,7 +115,7 @@ namespace RTC
|
|
|
115
115
|
OutgoingSsnResetRequestParameter* SoftClone(const uint8_t* buffer) const final;
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* We need to override this method since this
|
|
118
|
+
* We need to override this method since this chunk has a variable-length
|
|
119
119
|
* value and the fixed header doesn't have default length.
|
|
120
120
|
*/
|
|
121
121
|
size_t GetHeaderLength() const final
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "RTC/SCTP/packet/Parameter.hpp"
|
|
6
6
|
#include "Utils.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
#include <string>
|
|
8
|
-
#include <unordered_map>
|
|
9
9
|
|
|
10
10
|
namespace RTC
|
|
11
11
|
{
|
|
12
12
|
namespace SCTP
|
|
13
13
|
{
|
|
14
14
|
/**
|
|
15
|
-
* SCTP Re-configuration Response Parameter (
|
|
15
|
+
* SCTP Re-configuration Response Parameter (RECONFIGURATION-RESPONSE)
|
|
16
16
|
* (16).
|
|
17
17
|
*
|
|
18
18
|
* @see RFC 6525.
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
|
|
38
38
|
class ReconfigurationResponseParameter : public Parameter
|
|
39
39
|
{
|
|
40
|
-
// We need that
|
|
40
|
+
// We need that chunk calls protected and private methods in this class.
|
|
41
41
|
friend class Chunk;
|
|
42
42
|
|
|
43
43
|
public:
|
|
@@ -62,7 +62,7 @@ namespace RTC
|
|
|
62
62
|
* Parse a ReconfigurationResponseParameter.
|
|
63
63
|
*
|
|
64
64
|
* @remarks
|
|
65
|
-
* `bufferLength` may exceed the exact length of the
|
|
65
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
66
66
|
*/
|
|
67
67
|
static ReconfigurationResponseParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
68
68
|
|
|
@@ -70,7 +70,7 @@ namespace RTC
|
|
|
70
70
|
* Create a ReconfigurationResponseParameter.
|
|
71
71
|
*
|
|
72
72
|
* @remarks
|
|
73
|
-
* `bufferLength` could be greater than the
|
|
73
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
74
74
|
*/
|
|
75
75
|
static ReconfigurationResponseParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
76
76
|
|
|
@@ -87,7 +87,7 @@ namespace RTC
|
|
|
87
87
|
const uint8_t* buffer, size_t bufferLength, uint16_t parameterLength, uint8_t padding);
|
|
88
88
|
|
|
89
89
|
private:
|
|
90
|
-
static const
|
|
90
|
+
static const ankerl::unordered_dense::map<Result, std::string> Result2String;
|
|
91
91
|
|
|
92
92
|
private:
|
|
93
93
|
/**
|
|
@@ -149,7 +149,7 @@ namespace RTC
|
|
|
149
149
|
ReconfigurationResponseParameter* SoftClone(const uint8_t* buffer) const final;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
* We need to override this method since this
|
|
152
|
+
* We need to override this method since this chunk has a variable-length
|
|
153
153
|
* value and the fixed header doesn't have default length.
|
|
154
154
|
*/
|
|
155
155
|
size_t GetHeaderLength() const final
|
|
@@ -10,7 +10,7 @@ namespace RTC
|
|
|
10
10
|
namespace SCTP
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
13
|
-
* SCTP Zero Checksum Acceptable Parameter (
|
|
13
|
+
* SCTP Zero Checksum Acceptable Parameter (SSN-TSN-RESET-REQUEST)
|
|
14
14
|
* (15).
|
|
15
15
|
*
|
|
16
16
|
* @see RFC 6525.
|
|
@@ -29,7 +29,7 @@ namespace RTC
|
|
|
29
29
|
|
|
30
30
|
class SsnTsnResetRequestParameter : public Parameter
|
|
31
31
|
{
|
|
32
|
-
// We need that
|
|
32
|
+
// We need that chunk calls protected and private methods in this class.
|
|
33
33
|
friend class Chunk;
|
|
34
34
|
|
|
35
35
|
public:
|
|
@@ -40,7 +40,7 @@ namespace RTC
|
|
|
40
40
|
* Parse a SsnTsnResetRequestParameter.
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* `bufferLength` may exceed the exact length of the
|
|
43
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
44
44
|
*/
|
|
45
45
|
static SsnTsnResetRequestParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ namespace RTC
|
|
|
48
48
|
* Create a SsnTsnResetRequestParameter.
|
|
49
49
|
*
|
|
50
50
|
* @remarks
|
|
51
|
-
* `bufferLength` could be greater than the
|
|
51
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
52
52
|
*/
|
|
53
53
|
static SsnTsnResetRequestParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
54
54
|
|
|
@@ -86,7 +86,7 @@ namespace RTC
|
|
|
86
86
|
SsnTsnResetRequestParameter* SoftClone(const uint8_t* buffer) const final;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* We don't really need to override this method since this
|
|
89
|
+
* We don't really need to override this method since this parameter
|
|
90
90
|
* doesn't have variable-length value (despite the fixed header doesn't
|
|
91
91
|
* have default length).
|
|
92
92
|
*/
|
|
@@ -10,7 +10,7 @@ namespace RTC
|
|
|
10
10
|
namespace SCTP
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
13
|
-
* SCTP State Cookie Parameter (
|
|
13
|
+
* SCTP State Cookie Parameter (STATE-COOKIE) (7).
|
|
14
14
|
*
|
|
15
15
|
* @see RFC 9260.
|
|
16
16
|
*
|
|
@@ -29,7 +29,7 @@ namespace RTC
|
|
|
29
29
|
|
|
30
30
|
class StateCookieParameter : public Parameter
|
|
31
31
|
{
|
|
32
|
-
// We need that
|
|
32
|
+
// We need that chunk calls protected and private methods in this class.
|
|
33
33
|
friend class Chunk;
|
|
34
34
|
|
|
35
35
|
public:
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
* Parse a StateCookieParameter.
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* `bufferLength` may exceed the exact length of the
|
|
40
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
41
41
|
*/
|
|
42
42
|
static StateCookieParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ namespace RTC
|
|
|
45
45
|
* Create a StateCookieParameter.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* `bufferLength` could be greater than the
|
|
48
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
49
49
|
*/
|
|
50
50
|
static StateCookieParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
51
51
|
|
|
@@ -90,7 +90,7 @@ namespace RTC
|
|
|
90
90
|
void SetCookie(const uint8_t* cookie, uint16_t cookieLength);
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Write a locally generated StateCookie in place within the
|
|
93
|
+
* Write a locally generated StateCookie in place within the cookie
|
|
94
94
|
* field.
|
|
95
95
|
*
|
|
96
96
|
* This method is more performant than SetCookie() since it doesn't
|
|
@@ -10,7 +10,7 @@ namespace RTC
|
|
|
10
10
|
namespace SCTP
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
13
|
-
* SCTP Supported Address Types Parameter (
|
|
13
|
+
* SCTP Supported Address Types Parameter (SUPPORTED-ADDRESS-TYPES) (12).
|
|
14
14
|
*
|
|
15
15
|
* @see RFC 9260.
|
|
16
16
|
*
|
|
@@ -30,7 +30,7 @@ namespace RTC
|
|
|
30
30
|
|
|
31
31
|
class SupportedAddressTypesParameter : public Parameter
|
|
32
32
|
{
|
|
33
|
-
// We need that
|
|
33
|
+
// We need that chunk calls protected and private methods in this class.
|
|
34
34
|
friend class Chunk;
|
|
35
35
|
|
|
36
36
|
public:
|
|
@@ -38,7 +38,7 @@ namespace RTC
|
|
|
38
38
|
* Parse a SupportedAddressTypesParameter.
|
|
39
39
|
*
|
|
40
40
|
* @remarks
|
|
41
|
-
* `bufferLength` may exceed the exact length of the
|
|
41
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
42
42
|
*/
|
|
43
43
|
static SupportedAddressTypesParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ namespace RTC
|
|
|
46
46
|
* Create a SupportedAddressTypesParameter.
|
|
47
47
|
*
|
|
48
48
|
* @remarks
|
|
49
|
-
* `bufferLength` could be greater than the
|
|
49
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
50
50
|
*/
|
|
51
51
|
static SupportedAddressTypesParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
52
52
|
|
|
@@ -11,7 +11,7 @@ namespace RTC
|
|
|
11
11
|
namespace SCTP
|
|
12
12
|
{
|
|
13
13
|
/**
|
|
14
|
-
* SCTP Supported Extensions Parameter (
|
|
14
|
+
* SCTP Supported Extensions Parameter (SUPPORTED-EXTENSIONS) (32776).
|
|
15
15
|
*
|
|
16
16
|
* @see RFC 5061.
|
|
17
17
|
*
|
|
@@ -33,7 +33,7 @@ namespace RTC
|
|
|
33
33
|
|
|
34
34
|
class SupportedExtensionsParameter : public Parameter
|
|
35
35
|
{
|
|
36
|
-
// We need that
|
|
36
|
+
// We need that chunk calls protected and private methods in this class.
|
|
37
37
|
friend class Chunk;
|
|
38
38
|
|
|
39
39
|
public:
|
|
@@ -41,7 +41,7 @@ namespace RTC
|
|
|
41
41
|
* Parse a SupportedExtensionsParameter.
|
|
42
42
|
*
|
|
43
43
|
* @remarks
|
|
44
|
-
* `bufferLength` may exceed the exact length of the
|
|
44
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
45
45
|
*/
|
|
46
46
|
static SupportedExtensionsParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ namespace RTC
|
|
|
49
49
|
* Create a SupportedExtensionsParameter.
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* `bufferLength` could be greater than the
|
|
52
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
53
53
|
*/
|
|
54
54
|
static SupportedExtensionsParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
55
55
|
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
class UnknownParameter : public Parameter
|
|
29
29
|
{
|
|
30
|
-
// We need that
|
|
30
|
+
// We need that chunk calls protected and private methods in this class.
|
|
31
31
|
friend class Chunk;
|
|
32
32
|
|
|
33
33
|
public:
|
|
@@ -35,7 +35,7 @@ namespace RTC
|
|
|
35
35
|
* Parse a UnknownParameter.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* `bufferLength` may exceed the exact length of the
|
|
38
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
39
39
|
*/
|
|
40
40
|
static UnknownParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
41
41
|
|
|
@@ -9,7 +9,7 @@ namespace RTC
|
|
|
9
9
|
namespace SCTP
|
|
10
10
|
{
|
|
11
11
|
/**
|
|
12
|
-
* SCTP Unrecognized Parameter Parameter (
|
|
12
|
+
* SCTP Unrecognized Parameter Parameter (UNRECOGNIZED-PARAMETER) (7).
|
|
13
13
|
*
|
|
14
14
|
* @see RFC 9260.
|
|
15
15
|
*
|
|
@@ -28,7 +28,7 @@ namespace RTC
|
|
|
28
28
|
|
|
29
29
|
class UnrecognizedParameterParameter : public Parameter
|
|
30
30
|
{
|
|
31
|
-
// We need that
|
|
31
|
+
// We need that chunk calls protected and private methods in this class.
|
|
32
32
|
friend class Chunk;
|
|
33
33
|
|
|
34
34
|
public:
|
|
@@ -36,7 +36,7 @@ namespace RTC
|
|
|
36
36
|
* Parse a UnrecognizedParameterParameter.
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* `bufferLength` may exceed the exact length of the
|
|
39
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
40
40
|
*/
|
|
41
41
|
static UnrecognizedParameterParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ namespace RTC
|
|
|
44
44
|
* Create a UnrecognizedParameterParameter.
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* `bufferLength` could be greater than the
|
|
47
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
48
48
|
*/
|
|
49
49
|
static UnrecognizedParameterParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
50
50
|
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "RTC/SCTP/packet/Parameter.hpp"
|
|
6
6
|
#include "Utils.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
#include <string>
|
|
8
|
-
#include <unordered_map>
|
|
9
9
|
|
|
10
10
|
namespace RTC
|
|
11
11
|
{
|
|
12
12
|
namespace SCTP
|
|
13
13
|
{
|
|
14
14
|
/**
|
|
15
|
-
* SCTP Zero Checksum Acceptable Parameter (
|
|
15
|
+
* SCTP Zero Checksum Acceptable Parameter (ZERO-CHECKSUM-ACCEPTABLE)
|
|
16
16
|
* (32769).
|
|
17
17
|
*
|
|
18
18
|
* @see RFC 9653.
|
|
@@ -31,7 +31,7 @@ namespace RTC
|
|
|
31
31
|
|
|
32
32
|
class ZeroChecksumAcceptableParameter : public Parameter
|
|
33
33
|
{
|
|
34
|
-
// We need that
|
|
34
|
+
// We need that chunk calls protected and private methods in this class.
|
|
35
35
|
friend class Chunk;
|
|
36
36
|
|
|
37
37
|
public:
|
|
@@ -53,7 +53,7 @@ namespace RTC
|
|
|
53
53
|
* Parse a ZeroChecksumAcceptableParameter.
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* `bufferLength` may exceed the exact length of the
|
|
56
|
+
* `bufferLength` may exceed the exact length of the parameter.
|
|
57
57
|
*/
|
|
58
58
|
static ZeroChecksumAcceptableParameter* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
59
59
|
|
|
@@ -61,7 +61,7 @@ namespace RTC
|
|
|
61
61
|
* Create a ZeroChecksumAcceptableParameter.
|
|
62
62
|
*
|
|
63
63
|
* @remarks
|
|
64
|
-
* `bufferLength` could be greater than the
|
|
64
|
+
* `bufferLength` could be greater than the parameter real length.
|
|
65
65
|
*/
|
|
66
66
|
static ZeroChecksumAcceptableParameter* Factory(uint8_t* buffer, size_t bufferLength);
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ namespace RTC
|
|
|
78
78
|
static ZeroChecksumAcceptableParameter* ParseStrict(
|
|
79
79
|
const uint8_t* buffer, size_t bufferLength, uint16_t parameterLength, uint8_t padding);
|
|
80
80
|
|
|
81
|
-
static const
|
|
81
|
+
static const ankerl::unordered_dense::map<AlternateErrorDetectionMethod, std::string>
|
|
82
82
|
AlternateErrorDetectionMethod2String;
|
|
83
83
|
|
|
84
84
|
private:
|
|
@@ -116,7 +116,7 @@ namespace RTC
|
|
|
116
116
|
ZeroChecksumAcceptableParameter* SoftClone(const uint8_t* buffer) const final;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
* We don't really need to override this method since this
|
|
119
|
+
* We don't really need to override this method since this parameter
|
|
120
120
|
* doesn't have variable-length value (despite the fixed header doesn't
|
|
121
121
|
* have default length).
|
|
122
122
|
*/
|
|
@@ -18,7 +18,7 @@ namespace RTC
|
|
|
18
18
|
* The SCTP Association class represents the mediasoup side of an SCTP
|
|
19
19
|
* association with a remote peer.
|
|
20
20
|
*
|
|
21
|
-
* It manages all
|
|
21
|
+
* It manages all packet and chunk dispatching and the connection flow.
|
|
22
22
|
*/
|
|
23
23
|
class AssociationInterface
|
|
24
24
|
{
|
|
@@ -40,7 +40,7 @@ namespace RTC
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Initiate the SCTP association with the remote peer. It sends an INIT
|
|
43
|
-
*
|
|
43
|
+
* chunk.
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
46
|
* - The SCTP association must be in New state.
|
|
@@ -48,7 +48,7 @@ namespace RTC
|
|
|
48
48
|
virtual void Connect() = 0;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Gracefully shutdowns the
|
|
51
|
+
* Gracefully shutdowns the association and sends all outstanding data.
|
|
52
52
|
* This is an asynchronous operation and `OnAssociationClosed()` will be
|
|
53
53
|
* called on success.
|
|
54
54
|
*
|
|
@@ -61,7 +61,7 @@ namespace RTC
|
|
|
61
61
|
virtual void Shutdown() = 0;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* Closes the
|
|
64
|
+
* Closes the association non-gracefully. Will send ABORT if the connection
|
|
65
65
|
* is not already closed. No callbacks will be made after Close() has
|
|
66
66
|
* returned. However, before Close() returns, it may have called
|
|
67
67
|
* `OnAssociationClosed()` or `OnAssociationAborted()` callbacks.
|
|
@@ -69,7 +69,7 @@ namespace RTC
|
|
|
69
69
|
virtual void Close() = 0;
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
* Retrieves the latest metrics. If the
|
|
72
|
+
* Retrieves the latest metrics. If the association is not fully connected,
|
|
73
73
|
* `std::nullopt` will be returned.
|
|
74
74
|
*/
|
|
75
75
|
virtual std::optional<AssociationMetrics> MakeMetrics() const = 0;
|
|
@@ -165,7 +165,7 @@ namespace RTC
|
|
|
165
165
|
* message will be queued.
|
|
166
166
|
*
|
|
167
167
|
* This has identical semantics to `SendMessage()', except that it may
|
|
168
|
-
* coalesce many messages into a single SCTP
|
|
168
|
+
* coalesce many messages into a single SCTP packet if they would fit.
|
|
169
169
|
*
|
|
170
170
|
* @remarks
|
|
171
171
|
* - Same as in `SendMessage()`.
|
|
@@ -174,7 +174,7 @@ namespace RTC
|
|
|
174
174
|
std::span<Message> messages, const SendMessageOptions& sendMessageOptions) = 0;
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Receives SCTP data (hopefully an SCTP
|
|
177
|
+
* Receives SCTP data (hopefully an SCTP packet) from the remote peer.
|
|
178
178
|
*/
|
|
179
179
|
virtual void ReceiveSctpData(const uint8_t* data, size_t len) = 0;
|
|
180
180
|
|
|
@@ -18,16 +18,16 @@ namespace RTC
|
|
|
18
18
|
|
|
19
19
|
public:
|
|
20
20
|
/**
|
|
21
|
-
* Called when an SCTP
|
|
21
|
+
* Called when an SCTP packet must be sent to the remote endpoint.
|
|
22
22
|
*
|
|
23
23
|
* @return
|
|
24
24
|
* - `true` if the packet was successfully sent. However, since
|
|
25
|
-
* sending is unreliable, there are no guarantees that the
|
|
25
|
+
* sending is unreliable, there are no guarantees that the packet was
|
|
26
26
|
* actually delivered.
|
|
27
|
-
* - `false` if the
|
|
27
|
+
* - `false` if the packet failed to be sent.
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
* - It is NOT allowed to call methods in
|
|
30
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
31
31
|
*/
|
|
32
32
|
virtual bool OnAssociationSendData(const uint8_t* data, size_t len) = 0;
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ namespace RTC
|
|
|
35
35
|
* Called when calling Connect().
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
|
-
* - It is allowed to call methods in
|
|
38
|
+
* - It is allowed to call methods in association within this callback.
|
|
39
39
|
*/
|
|
40
40
|
virtual void OnAssociationConnecting() = 0;
|
|
41
41
|
|
|
@@ -44,7 +44,7 @@ namespace RTC
|
|
|
44
44
|
* connection attempts.
|
|
45
45
|
*
|
|
46
46
|
* @remarks
|
|
47
|
-
* - It is allowed to call methods in
|
|
47
|
+
* - It is allowed to call methods in association within this callback.
|
|
48
48
|
*/
|
|
49
49
|
virtual void OnAssociationConnected() = 0;
|
|
50
50
|
|
|
@@ -53,19 +53,19 @@ namespace RTC
|
|
|
53
53
|
* in case the association fails.
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* - It is allowed to call methods in
|
|
56
|
+
* - It is allowed to call methods in association within this callback.
|
|
57
57
|
*/
|
|
58
58
|
virtual void OnAssociationFailed(Types::ErrorKind errorKind, std::string_view errorMessage) = 0;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Called when the
|
|
62
|
-
*
|
|
61
|
+
* Called when the association is closed in a controlled way or when the
|
|
62
|
+
* association has aborted - either as decided by this association due to
|
|
63
63
|
* e.g. too many retransmission attempts or by the peer when receiving an
|
|
64
64
|
* ABORT command. No other callbacks will be done after this callback,
|
|
65
65
|
* unless reconnecting.
|
|
66
66
|
*
|
|
67
67
|
* @remarks
|
|
68
|
-
* - It is allowed to call methods in
|
|
68
|
+
* - It is allowed to call methods in association within this callback.
|
|
69
69
|
*/
|
|
70
70
|
virtual void OnAssociationClosed(Types::ErrorKind errorKind, std::string_view errorMessage) = 0;
|
|
71
71
|
|
|
@@ -75,7 +75,7 @@ namespace RTC
|
|
|
75
75
|
* could have been packet loss as a result of restarting the association.
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* - It is allowed to call methods in
|
|
78
|
+
* - It is allowed to call methods in association within this callback.
|
|
79
79
|
*/
|
|
80
80
|
virtual void OnAssociationRestarted() = 0;
|
|
81
81
|
|
|
@@ -86,7 +86,7 @@ namespace RTC
|
|
|
86
86
|
* viable.
|
|
87
87
|
*
|
|
88
88
|
* @remarks
|
|
89
|
-
* - It is allowed to call methods in
|
|
89
|
+
* - It is allowed to call methods in association within this callback.
|
|
90
90
|
*/
|
|
91
91
|
virtual void OnAssociationError(Types::ErrorKind errorKind, std::string_view errorMessage) = 0;
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ namespace RTC
|
|
|
94
94
|
* Called when an SCTP message in full has been received.
|
|
95
95
|
*
|
|
96
96
|
* @remarks
|
|
97
|
-
* - It is allowed to call methods in
|
|
97
|
+
* - It is allowed to call methods in association within this callback.
|
|
98
98
|
*/
|
|
99
99
|
virtual void OnAssociationMessageReceived(Message message) = 0;
|
|
100
100
|
|
|
@@ -102,7 +102,7 @@ namespace RTC
|
|
|
102
102
|
* Indicates that a stream reset request has been performed.
|
|
103
103
|
*
|
|
104
104
|
* @remarks
|
|
105
|
-
* - It is allowed to call methods in
|
|
105
|
+
* - It is allowed to call methods in association within this callback.
|
|
106
106
|
*/
|
|
107
107
|
virtual void OnAssociationStreamsResetPerformed(std::span<const uint16_t> outboundStreamIds) = 0;
|
|
108
108
|
|
|
@@ -110,7 +110,7 @@ namespace RTC
|
|
|
110
110
|
* Indicates that a stream reset request has failed.
|
|
111
111
|
*
|
|
112
112
|
* @remarks
|
|
113
|
-
* - It is allowed to call methods in
|
|
113
|
+
* - It is allowed to call methods in association within this callback.
|
|
114
114
|
*/
|
|
115
115
|
virtual void OnAssociationStreamsResetFailed(
|
|
116
116
|
std::span<const uint16_t> outboundStreamIds, std::string_view errorMessage) = 0;
|
|
@@ -120,7 +120,7 @@ namespace RTC
|
|
|
120
120
|
* called. An empty list indicates that all streams have been reset.
|
|
121
121
|
*
|
|
122
122
|
* @remarks
|
|
123
|
-
* - It is allowed to call methods in
|
|
123
|
+
* - It is allowed to call methods in association within this callback.
|
|
124
124
|
*/
|
|
125
125
|
virtual void OnAssociationInboundStreamsReset(std::span<const uint16_t> inboundStreamIds) = 0;
|
|
126
126
|
|
|
@@ -129,7 +129,7 @@ namespace RTC
|
|
|
129
129
|
* the threshold set when calling SetStreamBufferedAmountLowThreshold().
|
|
130
130
|
*
|
|
131
131
|
* @remarks
|
|
132
|
-
* - It is allowed to call methods in
|
|
132
|
+
* - It is allowed to call methods in association within this callback.
|
|
133
133
|
*/
|
|
134
134
|
virtual void OnAssociationStreamBufferedAmountLow(uint16_t streamId) = 0;
|
|
135
135
|
|
|
@@ -139,18 +139,18 @@ namespace RTC
|
|
|
139
139
|
* `SctpOptions::totalBufferedAmountLowThreshold`.
|
|
140
140
|
*
|
|
141
141
|
* @remarks
|
|
142
|
-
* - It is allowed to call methods in
|
|
142
|
+
* - It is allowed to call methods in association within this callback.
|
|
143
143
|
*/
|
|
144
144
|
virtual void OnAssociationTotalBufferedAmountLow() = 0;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* Called when the
|
|
147
|
+
* Called when the association needs to know if the parent transport is
|
|
148
148
|
* ready for SCTP traffic (e.g. whether the WebRtcTransport has ICE and
|
|
149
149
|
* DTLS connected and at least a DataProducer or DataConsumer has been
|
|
150
150
|
* created). Returned boolean indicates it.
|
|
151
151
|
*
|
|
152
152
|
* @remarks
|
|
153
|
-
* - It is NOT allowed to call methods in
|
|
153
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
154
154
|
*/
|
|
155
155
|
virtual bool OnAssociationIsTransportReadyForSctp() = 0;
|
|
156
156
|
|
|
@@ -181,7 +181,7 @@ namespace RTC
|
|
|
181
181
|
*
|
|
182
182
|
* @remarks
|
|
183
183
|
* - This is a message lifecycle event.
|
|
184
|
-
* - It is NOT allowed to call methods in
|
|
184
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
185
185
|
*/
|
|
186
186
|
virtual void OnAssociationLifecycleMessageFullySent(uint64_t lifecycleId) {};
|
|
187
187
|
|
|
@@ -199,7 +199,7 @@ namespace RTC
|
|
|
199
199
|
* - This is a message lifecycle event.
|
|
200
200
|
* - It's guaranteed that OnAssociationLifecycleMessageDelivered() is not called
|
|
201
201
|
* if this callback has triggered.
|
|
202
|
-
* - It is NOT allowed to call methods in
|
|
202
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
203
203
|
*/
|
|
204
204
|
virtual void OnAssociationLifecycleMessageExpired(uint64_t lifecycleId, bool maybeDelivered)
|
|
205
205
|
{
|
|
@@ -220,7 +220,7 @@ namespace RTC
|
|
|
220
220
|
* - This is a message lifecycle event.
|
|
221
221
|
* - It's guaranteed that OnAssociationLifecycleMessageEnd() is not called if
|
|
222
222
|
* this callback has triggered.
|
|
223
|
-
* - It is NOT allowed to call methods in
|
|
223
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
224
224
|
*/
|
|
225
225
|
virtual void OnAssociationLifecycleMessageDelivered(uint64_t lifecycleId)
|
|
226
226
|
{
|
|
@@ -238,12 +238,12 @@ namespace RTC
|
|
|
238
238
|
*
|
|
239
239
|
* @remarks:
|
|
240
240
|
* - This is a message lifecycle event.
|
|
241
|
-
* - When the
|
|
241
|
+
* - When the association is deallocated, there will be no
|
|
242
242
|
* OnAssociationLifecycleMessageEnd() callbacks sent for messages that were
|
|
243
|
-
* enqueued. But as long as the
|
|
243
|
+
* enqueued. But as long as the association is alive, these callbacks are
|
|
244
244
|
* guaranteed to be sent as messages are either expired or successfully
|
|
245
245
|
* acknowledged.
|
|
246
|
-
* - It is NOT allowed to call methods in
|
|
246
|
+
* - It is NOT allowed to call methods in association within this callback.
|
|
247
247
|
*/
|
|
248
248
|
virtual void OnAssociationLifecycleMessageEnd(uint64_t lifecycleId)
|
|
249
249
|
{
|