werift 0.17.6 → 0.18.0
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/lib/common/src/binary.d.ts +1 -0
- package/lib/common/src/binary.js +74 -21
- package/lib/common/src/binary.js.map +1 -1
- package/lib/common/src/log.js +18 -0
- package/lib/common/src/log.js.map +1 -1
- package/lib/common/src/network.d.ts +1 -1
- package/lib/common/src/network.js +1 -0
- package/lib/common/src/network.js.map +1 -1
- package/lib/common/src/promise.js +22 -7
- package/lib/common/src/promise.js.map +1 -1
- package/lib/common/src/type.d.ts +1 -1
- package/lib/dtls/src/cipher/const.d.ts +7 -7
- package/lib/dtls/src/cipher/key-exchange.js +24 -1
- package/lib/dtls/src/cipher/key-exchange.js.map +1 -1
- package/lib/dtls/src/cipher/suites/abstract.d.ts +2 -2
- package/lib/dtls/src/cipher/suites/abstract.js +36 -2
- package/lib/dtls/src/cipher/suites/abstract.js.map +1 -1
- package/lib/dtls/src/cipher/suites/aead.js +60 -6
- package/lib/dtls/src/cipher/suites/aead.js.map +1 -1
- package/lib/dtls/src/client.js +62 -51
- package/lib/dtls/src/client.js.map +1 -1
- package/lib/dtls/src/context/cipher.js +151 -59
- package/lib/dtls/src/context/cipher.js.map +1 -1
- package/lib/dtls/src/context/dtls.js +90 -14
- package/lib/dtls/src/context/dtls.js.map +1 -1
- package/lib/dtls/src/context/srtp.d.ts +1 -1
- package/lib/dtls/src/context/srtp.js +8 -0
- package/lib/dtls/src/context/srtp.js.map +1 -1
- package/lib/dtls/src/context/transport.js +14 -2
- package/lib/dtls/src/context/transport.js.map +1 -1
- package/lib/dtls/src/flight/client/flight1.js +6 -1
- package/lib/dtls/src/flight/client/flight1.js.map +1 -1
- package/lib/dtls/src/flight/client/flight5.js +12 -2
- package/lib/dtls/src/flight/client/flight5.js.map +1 -1
- package/lib/dtls/src/flight/flight.d.ts +1 -1
- package/lib/dtls/src/flight/flight.js +42 -7
- package/lib/dtls/src/flight/flight.js.map +1 -1
- package/lib/dtls/src/flight/server/flight2.js +4 -2
- package/lib/dtls/src/flight/server/flight2.js.map +1 -1
- package/lib/dtls/src/flight/server/flight4.js +12 -2
- package/lib/dtls/src/flight/server/flight4.js.map +1 -1
- package/lib/dtls/src/flight/server/flight6.js +6 -1
- package/lib/dtls/src/flight/server/flight6.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/ellipticCurves.js +27 -7
- package/lib/dtls/src/handshake/extensions/ellipticCurves.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/extendedMasterSecret.js +6 -1
- package/lib/dtls/src/handshake/extensions/extendedMasterSecret.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/renegotiationIndication.js +27 -7
- package/lib/dtls/src/handshake/extensions/renegotiationIndication.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/signature.js +27 -7
- package/lib/dtls/src/handshake/extensions/signature.js.map +1 -1
- package/lib/dtls/src/handshake/extensions/useSrtp.js +39 -9
- package/lib/dtls/src/handshake/extensions/useSrtp.js.map +1 -1
- package/lib/dtls/src/handshake/message/alert.js +21 -6
- package/lib/dtls/src/handshake/message/alert.js.map +1 -1
- package/lib/dtls/src/handshake/message/certificate.js +26 -5
- package/lib/dtls/src/handshake/message/certificate.js.map +1 -1
- package/lib/dtls/src/handshake/message/changeCipherSpec.js +14 -4
- package/lib/dtls/src/handshake/message/changeCipherSpec.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/certificateVerify.js +33 -7
- package/lib/dtls/src/handshake/message/client/certificateVerify.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/hello.js +68 -18
- package/lib/dtls/src/handshake/message/client/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/client/keyExchange.js +26 -5
- package/lib/dtls/src/handshake/message/client/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/message/finished.js +18 -2
- package/lib/dtls/src/handshake/message/finished.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/certificateRequest.js +40 -9
- package/lib/dtls/src/handshake/message/server/certificateRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/hello.js +60 -14
- package/lib/dtls/src/handshake/message/server/hello.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloDone.js +18 -2
- package/lib/dtls/src/handshake/message/server/helloDone.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js +33 -7
- package/lib/dtls/src/handshake/message/server/helloVerifyRequest.js.map +1 -1
- package/lib/dtls/src/handshake/message/server/keyExchange.js +75 -19
- package/lib/dtls/src/handshake/message/server/keyExchange.js.map +1 -1
- package/lib/dtls/src/handshake/random.js +21 -6
- package/lib/dtls/src/handshake/random.js.map +1 -1
- package/lib/dtls/src/record/builder.d.ts +1 -1
- package/lib/dtls/src/record/message/fragment.js +49 -14
- package/lib/dtls/src/record/message/fragment.js.map +1 -1
- package/lib/dtls/src/record/message/header.js +84 -24
- package/lib/dtls/src/record/message/header.js.map +1 -1
- package/lib/dtls/src/record/message/plaintext.js +21 -6
- package/lib/dtls/src/record/message/plaintext.js.map +1 -1
- package/lib/dtls/src/server.js +59 -42
- package/lib/dtls/src/server.js.map +1 -1
- package/lib/dtls/src/socket.js +153 -64
- package/lib/dtls/src/socket.js.map +1 -1
- package/lib/dtls/src/transport.js +38 -11
- package/lib/dtls/src/transport.js.map +1 -1
- package/lib/dtls/src/typings/domain.d.ts +4 -4
- package/lib/ice/src/candidate.js +66 -11
- package/lib/ice/src/candidate.js.map +1 -1
- package/lib/ice/src/dns/lookup.js +12 -1
- package/lib/ice/src/dns/lookup.js.map +1 -1
- package/lib/ice/src/exceptions.js +27 -2
- package/lib/ice/src/exceptions.js.map +1 -1
- package/lib/ice/src/helper.d.ts +1 -1
- package/lib/ice/src/helper.js +12 -2
- package/lib/ice/src/helper.js.map +1 -1
- package/lib/ice/src/ice.d.ts +9 -3
- package/lib/ice/src/ice.js +407 -155
- package/lib/ice/src/ice.js.map +1 -1
- package/lib/ice/src/stun/attributes.d.ts +3 -3
- package/lib/ice/src/stun/attributes.js +6 -1
- package/lib/ice/src/stun/attributes.js.map +1 -1
- package/lib/ice/src/stun/message.d.ts +4 -0
- package/lib/ice/src/stun/message.js +24 -3
- package/lib/ice/src/stun/message.js.map +1 -1
- package/lib/ice/src/stun/protocol.js +64 -15
- package/lib/ice/src/stun/protocol.js.map +1 -1
- package/lib/ice/src/stun/transaction.js +99 -36
- package/lib/ice/src/stun/transaction.js.map +1 -1
- package/lib/ice/src/transport.js +57 -21
- package/lib/ice/src/transport.js.map +1 -1
- package/lib/ice/src/turn/protocol.js +176 -40
- package/lib/ice/src/turn/protocol.js.map +1 -1
- package/lib/ice/src/types/model.d.ts +1 -1
- package/lib/rtp/src/codec/av1.d.ts +1 -1
- package/lib/rtp/src/codec/av1.js +118 -30
- package/lib/rtp/src/codec/av1.js.map +1 -1
- package/lib/rtp/src/codec/base.js +8 -0
- package/lib/rtp/src/codec/base.js.map +1 -1
- package/lib/rtp/src/codec/h264.js +55 -0
- package/lib/rtp/src/codec/h264.js.map +1 -1
- package/lib/rtp/src/codec/index.d.ts +2 -0
- package/lib/rtp/src/codec/index.js +12 -2
- package/lib/rtp/src/codec/index.js.map +1 -1
- package/lib/rtp/src/codec/opus.js +8 -0
- package/lib/rtp/src/codec/opus.js.map +1 -1
- package/lib/rtp/src/codec/vp8.js +102 -3
- package/lib/rtp/src/codec/vp8.js.map +1 -1
- package/lib/rtp/src/codec/vp9.js +164 -7
- package/lib/rtp/src/codec/vp9.js.map +1 -1
- package/lib/rtp/src/container/ebml/ebml.js +30 -3
- package/lib/rtp/src/container/ebml/ebml.js.map +1 -1
- package/lib/rtp/src/container/webm.d.ts +1 -1
- package/lib/rtp/src/container/webm.js +44 -13
- package/lib/rtp/src/container/webm.js.map +1 -1
- package/lib/rtp/src/processor/depacketizer.d.ts +16 -8
- package/lib/rtp/src/processor/depacketizer.js +59 -22
- package/lib/rtp/src/processor/depacketizer.js.map +1 -1
- package/lib/rtp/src/processor/depacketizerCallback.js +24 -8
- package/lib/rtp/src/processor/depacketizerCallback.js.map +1 -1
- package/lib/rtp/src/processor/depacketizerTransformer.d.ts +2 -2
- package/lib/rtp/src/processor/depacketizerTransformer.js +6 -0
- package/lib/rtp/src/processor/depacketizerTransformer.js.map +1 -1
- package/lib/rtp/src/processor/index.d.ts +4 -2
- package/lib/rtp/src/processor/index.js +4 -2
- package/lib/rtp/src/processor/index.js.map +1 -1
- package/lib/rtp/src/processor/interface.d.ts +4 -0
- package/lib/rtp/src/processor/interface.js.map +1 -1
- package/lib/rtp/src/processor/jitterBuffer.d.ts +2 -1
- package/lib/rtp/src/processor/jitterBuffer.js +40 -8
- package/lib/rtp/src/processor/jitterBuffer.js.map +1 -1
- package/lib/rtp/src/processor/jitterBufferCallback.js +30 -9
- package/lib/rtp/src/processor/jitterBufferCallback.js.map +1 -1
- package/lib/rtp/src/processor/jitterBufferTransformer.js +12 -1
- package/lib/rtp/src/processor/jitterBufferTransformer.js.map +1 -1
- package/lib/rtp/src/processor/lipsync.d.ts +42 -0
- package/lib/rtp/src/processor/lipsync.js +178 -0
- package/lib/rtp/src/processor/lipsync.js.map +1 -0
- package/lib/rtp/src/processor/lipsyncCallback.d.ts +10 -0
- package/lib/rtp/src/processor/lipsyncCallback.js +59 -0
- package/lib/rtp/src/processor/lipsyncCallback.js.map +1 -0
- package/lib/rtp/src/processor/ntpTime.d.ts +24 -0
- package/lib/rtp/src/processor/ntpTime.js +91 -0
- package/lib/rtp/src/processor/ntpTime.js.map +1 -0
- package/lib/rtp/src/processor/ntpTimeCallback.d.ts +7 -0
- package/lib/rtp/src/processor/ntpTimeCallback.js +36 -0
- package/lib/rtp/src/processor/ntpTimeCallback.js.map +1 -0
- package/lib/rtp/src/processor/source/index.d.ts +1 -0
- package/lib/rtp/src/processor/source/index.js +1 -0
- package/lib/rtp/src/processor/source/index.js.map +1 -1
- package/lib/rtp/src/processor/source/rtcpCallback.d.ts +12 -0
- package/lib/rtp/src/processor/source/rtcpCallback.js +33 -0
- package/lib/rtp/src/processor/source/rtcpCallback.js.map +1 -0
- package/lib/rtp/src/processor/source/rtpCallback.js +28 -12
- package/lib/rtp/src/processor/source/rtpCallback.js.map +1 -1
- package/lib/rtp/src/processor/source/rtpStream.js +38 -10
- package/lib/rtp/src/processor/source/rtpStream.js.map +1 -1
- package/lib/rtp/src/processor/webm.d.ts +11 -4
- package/lib/rtp/src/processor/webm.js +169 -46
- package/lib/rtp/src/processor/webm.js.map +1 -1
- package/lib/rtp/src/processor/webmCallback.d.ts +5 -3
- package/lib/rtp/src/processor/webmCallback.js +52 -8
- package/lib/rtp/src/processor/webmCallback.js.map +1 -1
- package/lib/rtp/src/processor/webmStream.d.ts +2 -2
- package/lib/rtp/src/processor/webmStream.js +24 -0
- package/lib/rtp/src/processor/webmStream.js.map +1 -1
- package/lib/rtp/src/processor_old/base.d.ts +18 -0
- package/lib/rtp/src/processor_old/base.js +51 -0
- package/lib/rtp/src/processor_old/base.js.map +1 -0
- package/lib/rtp/src/processor_old/lipsync.d.ts +30 -0
- package/lib/rtp/src/processor_old/lipsync.js +119 -0
- package/lib/rtp/src/processor_old/lipsync.js.map +1 -0
- package/lib/rtp/src/rtcp/header.js +30 -5
- package/lib/rtp/src/rtcp/header.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.d.ts +1 -1
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js +30 -3
- package/lib/rtp/src/rtcp/psfb/fullIntraRequest.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/index.d.ts +1 -1
- package/lib/rtp/src/rtcp/psfb/index.js +18 -2
- package/lib/rtp/src/rtcp/psfb/index.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/pictureLossIndication.js +30 -3
- package/lib/rtp/src/rtcp/psfb/pictureLossIndication.js.map +1 -1
- package/lib/rtp/src/rtcp/psfb/remb.js +66 -5
- package/lib/rtp/src/rtcp/psfb/remb.js.map +1 -1
- package/lib/rtp/src/rtcp/rr.js +68 -4
- package/lib/rtp/src/rtcp/rr.js.map +1 -1
- package/lib/rtp/src/rtcp/rtcp.d.ts +1 -1
- package/lib/rtp/src/rtcp/rtpfb/index.d.ts +1 -1
- package/lib/rtp/src/rtcp/rtpfb/index.js +24 -2
- package/lib/rtp/src/rtcp/rtpfb/index.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/nack.d.ts +5 -0
- package/lib/rtp/src/rtcp/rtpfb/nack.js +43 -3
- package/lib/rtp/src/rtcp/rtpfb/nack.js.map +1 -1
- package/lib/rtp/src/rtcp/rtpfb/twcc.js +154 -11
- package/lib/rtp/src/rtcp/rtpfb/twcc.js.map +1 -1
- package/lib/rtp/src/rtcp/sdes.js +42 -4
- package/lib/rtp/src/rtcp/sdes.js.map +1 -1
- package/lib/rtp/src/rtcp/sr.js +56 -5
- package/lib/rtp/src/rtcp/sr.js.map +1 -1
- package/lib/rtp/src/rtp/red/encoder.js +18 -3
- package/lib/rtp/src/rtp/red/encoder.js.map +1 -1
- package/lib/rtp/src/rtp/red/handler.js +12 -2
- package/lib/rtp/src/rtp/red/handler.js.map +1 -1
- package/lib/rtp/src/rtp/red/packet.js +18 -2
- package/lib/rtp/src/rtp/red/packet.js.map +1 -1
- package/lib/rtp/src/rtp/rtp.d.ts +3 -3
- package/lib/rtp/src/rtp/rtp.js +104 -17
- package/lib/rtp/src/rtp/rtp.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/ctr.js +26 -10
- package/lib/rtp/src/srtp/cipher/ctr.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/gcm.d.ts +3 -0
- package/lib/rtp/src/srtp/cipher/gcm.js +40 -20
- package/lib/rtp/src/srtp/cipher/gcm.js.map +1 -1
- package/lib/rtp/src/srtp/cipher/index.js +24 -4
- package/lib/rtp/src/srtp/cipher/index.js.map +1 -1
- package/lib/rtp/src/srtp/const.d.ts +1 -1
- package/lib/rtp/src/srtp/context/context.d.ts +1 -1
- package/lib/rtp/src/srtp/context/context.js +84 -5
- package/lib/rtp/src/srtp/context/context.js.map +1 -1
- package/lib/rtp/src/srtp/session.d.ts +2 -2
- package/lib/rtp/src/srtp/session.js +24 -1
- package/lib/rtp/src/srtp/session.js.map +1 -1
- package/lib/rtp/src/srtp/srtcp.js +15 -5
- package/lib/rtp/src/srtp/srtcp.js.map +1 -1
- package/lib/rtp/src/srtp/srtp.js +15 -5
- package/lib/rtp/src/srtp/srtp.js.map +1 -1
- package/lib/sctp/src/chunk.js +349 -69
- package/lib/sctp/src/chunk.js.map +1 -1
- package/lib/sctp/src/helper.d.ts +1 -1
- package/lib/sctp/src/param.d.ts +3 -3
- package/lib/sctp/src/param.js +66 -11
- package/lib/sctp/src/param.js.map +1 -1
- package/lib/sctp/src/sctp.d.ts +1 -1
- package/lib/sctp/src/sctp.js +479 -138
- package/lib/sctp/src/sctp.js.map +1 -1
- package/lib/sctp/src/transport.js +31 -10
- package/lib/sctp/src/transport.js.map +1 -1
- package/lib/webrtc/src/dataChannel.d.ts +1 -1
- package/lib/webrtc/src/dataChannel.js +145 -15
- package/lib/webrtc/src/dataChannel.js.map +1 -1
- package/lib/webrtc/src/helper.js +37 -12
- package/lib/webrtc/src/helper.js.map +1 -1
- package/lib/webrtc/src/media/parameters.d.ts +1 -1
- package/lib/webrtc/src/media/parameters.js +124 -3
- package/lib/webrtc/src/media/parameters.js.map +1 -1
- package/lib/webrtc/src/media/receiver/nack.d.ts +4 -4
- package/lib/webrtc/src/media/receiver/nack.js +85 -33
- package/lib/webrtc/src/media/receiver/nack.js.map +1 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.d.ts +1 -1
- package/lib/webrtc/src/media/receiver/receiverTwcc.js +42 -6
- package/lib/webrtc/src/media/receiver/receiverTwcc.js.map +1 -1
- package/lib/webrtc/src/media/receiver/statistics.js +61 -5
- package/lib/webrtc/src/media/receiver/statistics.js.map +1 -1
- package/lib/webrtc/src/media/router.d.ts +1 -1
- package/lib/webrtc/src/media/router.js +108 -83
- package/lib/webrtc/src/media/router.js.map +1 -1
- package/lib/webrtc/src/media/rtpReceiver.js +188 -33
- package/lib/webrtc/src/media/rtpReceiver.js.map +1 -1
- package/lib/webrtc/src/media/rtpSender.js +279 -42
- package/lib/webrtc/src/media/rtpSender.js.map +1 -1
- package/lib/webrtc/src/media/rtpTransceiver.d.ts +2 -2
- package/lib/webrtc/src/media/rtpTransceiver.js +102 -18
- package/lib/webrtc/src/media/rtpTransceiver.js.map +1 -1
- package/lib/webrtc/src/media/sender/cumulativeResult.js +36 -6
- package/lib/webrtc/src/media/sender/cumulativeResult.js.map +1 -1
- package/lib/webrtc/src/media/sender/senderBWE.js +57 -12
- package/lib/webrtc/src/media/sender/senderBWE.js.map +1 -1
- package/lib/webrtc/src/media/track.js +135 -24
- package/lib/webrtc/src/media/track.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/index.d.ts +7 -4
- package/lib/webrtc/src/nonstandard/recorder/index.js +50 -6
- package/lib/webrtc/src/nonstandard/recorder/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js +12 -2
- package/lib/webrtc/src/nonstandard/recorder/writer/index.js.map +1 -1
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.d.ts +2 -2
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js +39 -35
- package/lib/webrtc/src/nonstandard/recorder/writer/webm.js.map +1 -1
- package/lib/webrtc/src/nonstandard/userMedia.js +158 -56
- package/lib/webrtc/src/nonstandard/userMedia.js.map +1 -1
- package/lib/webrtc/src/peerConnection.d.ts +2 -2
- package/lib/webrtc/src/peerConnection.js +260 -58
- package/lib/webrtc/src/peerConnection.js.map +1 -1
- package/lib/webrtc/src/sdp.js +287 -24
- package/lib/webrtc/src/sdp.js.map +1 -1
- package/lib/webrtc/src/transport/dtls.d.ts +3 -3
- package/lib/webrtc/src/transport/dtls.js +185 -30
- package/lib/webrtc/src/transport/dtls.js.map +1 -1
- package/lib/webrtc/src/transport/ice.d.ts +2 -2
- package/lib/webrtc/src/transport/ice.js +193 -25
- package/lib/webrtc/src/transport/ice.js.map +1 -1
- package/lib/webrtc/src/transport/sctp.js +193 -101
- package/lib/webrtc/src/transport/sctp.js.map +1 -1
- package/lib/webrtc/src/types/domain.d.ts +3 -3
- package/lib/webrtc/src/types/util.d.ts +2 -2
- package/lib/webrtc/src/utils.js +12 -2
- package/lib/webrtc/src/utils.js.map +1 -1
- package/package.json +15 -15
- package/src/dataChannel.ts +3 -1
- package/src/media/receiver/nack.ts +23 -19
- package/src/media/rtpReceiver.ts +5 -0
- package/src/media/rtpSender.ts +22 -19
- package/src/nonstandard/recorder/index.ts +12 -4
- package/src/nonstandard/recorder/writer/webm.ts +42 -50
- package/src/transport/dtls.ts +7 -3
- package/src/transport/ice.ts +6 -3
- package/src/transport/sctp.ts +3 -1
- package/lib/rtp/src/processor/avBuffer.d.ts +0 -36
- package/lib/rtp/src/processor/avBuffer.js +0 -107
- package/lib/rtp/src/processor/avBuffer.js.map +0 -1
- package/lib/rtp/src/processor/avBufferCallback.d.ts +0 -10
- package/lib/rtp/src/processor/avBufferCallback.js +0 -27
- package/lib/rtp/src/processor/avBufferCallback.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"srtp.js","sourceRoot":"","sources":["../../../../../rtp/src/srtp/srtp.ts"],"names":[],"mappings":";;;AACA,yCAA6C;AAC7C,uCAA4C;AAE5C,MAAa,WAAY,SAAQ,iBAAoB;IACnD,YAAmB,MAAc;QAC/B,KAAK,CAAC,kBAAW,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"srtp.js","sourceRoot":"","sources":["../../../../../rtp/src/srtp/srtp.ts"],"names":[],"mappings":";;;AACA,yCAA6C;AAC7C,uCAA4C;AAE5C,MAAa,WAAY,SAAQ,iBAAoB;IACnD,YAAmB,MAAc;QAC/B,KAAK,CAAC,kBAAW,CAAC,CAAC;;;;;mBADF;;QAWnB;;;;mBAAU,CAAC,GAAW,EAAE,EAAE;gBACxB,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBACvD,OAAO,SAAS,CAAC;YACnB,CAAC;WAAC;QAZA,IAAI,CAAC,KAAK,CACR,MAAM,CAAC,IAAI,CAAC,cAAc,EAC1B,MAAM,CAAC,IAAI,CAAC,eAAe,EAC3B,MAAM,CAAC,IAAI,CAAC,eAAe,EAC3B,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAC5B,MAAM,CAAC,OAAO,CACf,CAAC;IACJ,CAAC;IAOD,OAAO,CAAC,OAAe,EAAE,MAAiB;QACxC,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;CACF;AApBD,kCAoBC","sourcesContent":["import { RtpHeader } from \"../rtp/rtp\";\nimport { SrtpContext } from \"./context/srtp\";\nimport { Config, Session } from \"./session\";\n\nexport class SrtpSession extends Session<SrtpContext> {\n constructor(public config: Config) {\n super(SrtpContext);\n this.start(\n config.keys.localMasterKey,\n config.keys.localMasterSalt,\n config.keys.remoteMasterKey,\n config.keys.remoteMasterSalt,\n config.profile\n );\n }\n\n decrypt = (buf: Buffer) => {\n const [decrypted] = this.remoteContext.decryptRtp(buf);\n return decrypted;\n };\n\n encrypt(payload: Buffer, header: RtpHeader) {\n return this.localContext.encryptRtp(payload, header);\n }\n}\n"]}
|
package/lib/sctp/src/chunk.js
CHANGED
|
@@ -30,16 +30,26 @@ exports.serializePacket = exports.parsePacket = exports.decodeParams = exports.C
|
|
|
30
30
|
const jspack_1 = require("jspack");
|
|
31
31
|
const crc32c = require("turbo-crc32/crc32c");
|
|
32
32
|
class Chunk {
|
|
33
|
-
constructor(flags = 0, _body = Buffer.from("")) {
|
|
34
|
-
this.flags = flags;
|
|
35
|
-
this._body = _body;
|
|
36
|
-
}
|
|
37
33
|
get body() {
|
|
38
34
|
return this._body;
|
|
39
35
|
}
|
|
40
36
|
set body(value) {
|
|
41
37
|
this._body = value;
|
|
42
38
|
}
|
|
39
|
+
constructor(flags = 0, _body = Buffer.from("")) {
|
|
40
|
+
Object.defineProperty(this, "flags", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: flags
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(this, "_body", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value: _body
|
|
51
|
+
});
|
|
52
|
+
}
|
|
43
53
|
get type() {
|
|
44
54
|
return Chunk.type;
|
|
45
55
|
}
|
|
@@ -55,11 +65,57 @@ class Chunk {
|
|
|
55
65
|
}
|
|
56
66
|
}
|
|
57
67
|
exports.Chunk = Chunk;
|
|
58
|
-
Chunk
|
|
68
|
+
Object.defineProperty(Chunk, "type", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: -1
|
|
73
|
+
});
|
|
59
74
|
class BaseInitChunk extends Chunk {
|
|
60
75
|
constructor(flags = 0, body) {
|
|
61
76
|
super(flags, body);
|
|
62
|
-
this
|
|
77
|
+
Object.defineProperty(this, "flags", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
configurable: true,
|
|
80
|
+
writable: true,
|
|
81
|
+
value: flags
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(this, "initiateTag", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
configurable: true,
|
|
86
|
+
writable: true,
|
|
87
|
+
value: void 0
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(this, "advertisedRwnd", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
configurable: true,
|
|
92
|
+
writable: true,
|
|
93
|
+
value: void 0
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(this, "outboundStreams", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
configurable: true,
|
|
98
|
+
writable: true,
|
|
99
|
+
value: void 0
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(this, "inboundStreams", {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
configurable: true,
|
|
104
|
+
writable: true,
|
|
105
|
+
value: void 0
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(this, "initialTsn", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
configurable: true,
|
|
110
|
+
writable: true,
|
|
111
|
+
value: void 0
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(this, "params", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true,
|
|
117
|
+
value: void 0
|
|
118
|
+
});
|
|
63
119
|
if (body) {
|
|
64
120
|
[
|
|
65
121
|
this.initiateTag,
|
|
@@ -98,26 +154,57 @@ class InitChunk extends BaseInitChunk {
|
|
|
98
154
|
}
|
|
99
155
|
}
|
|
100
156
|
exports.InitChunk = InitChunk;
|
|
101
|
-
InitChunk
|
|
157
|
+
Object.defineProperty(InitChunk, "type", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
configurable: true,
|
|
160
|
+
writable: true,
|
|
161
|
+
value: 1
|
|
162
|
+
});
|
|
102
163
|
class InitAckChunk extends BaseInitChunk {
|
|
103
164
|
get type() {
|
|
104
165
|
return InitAckChunk.type;
|
|
105
166
|
}
|
|
106
167
|
}
|
|
107
168
|
exports.InitAckChunk = InitAckChunk;
|
|
108
|
-
InitAckChunk
|
|
169
|
+
Object.defineProperty(InitAckChunk, "type", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
configurable: true,
|
|
172
|
+
writable: true,
|
|
173
|
+
value: 2
|
|
174
|
+
});
|
|
109
175
|
class ReConfigChunk extends BaseInitChunk {
|
|
110
176
|
get type() {
|
|
111
177
|
return ReConfigChunk.type;
|
|
112
178
|
}
|
|
113
179
|
}
|
|
114
180
|
exports.ReConfigChunk = ReConfigChunk;
|
|
115
|
-
ReConfigChunk
|
|
181
|
+
Object.defineProperty(ReConfigChunk, "type", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
configurable: true,
|
|
184
|
+
writable: true,
|
|
185
|
+
value: 130
|
|
186
|
+
});
|
|
116
187
|
class ForwardTsnChunk extends Chunk {
|
|
117
188
|
constructor(flags = 0, body) {
|
|
118
189
|
super(flags, body);
|
|
119
|
-
this
|
|
120
|
-
|
|
190
|
+
Object.defineProperty(this, "flags", {
|
|
191
|
+
enumerable: true,
|
|
192
|
+
configurable: true,
|
|
193
|
+
writable: true,
|
|
194
|
+
value: flags
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(this, "streams", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
configurable: true,
|
|
199
|
+
writable: true,
|
|
200
|
+
value: []
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(this, "cumulativeTsn", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
configurable: true,
|
|
205
|
+
writable: true,
|
|
206
|
+
value: void 0
|
|
207
|
+
});
|
|
121
208
|
if (body) {
|
|
122
209
|
this.cumulativeTsn = jspack_1.jspack.Unpack("!L", body)[0];
|
|
123
210
|
let pos = 4;
|
|
@@ -143,31 +230,114 @@ class ForwardTsnChunk extends Chunk {
|
|
|
143
230
|
}
|
|
144
231
|
}
|
|
145
232
|
exports.ForwardTsnChunk = ForwardTsnChunk;
|
|
146
|
-
ForwardTsnChunk
|
|
233
|
+
Object.defineProperty(ForwardTsnChunk, "type", {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
configurable: true,
|
|
236
|
+
writable: true,
|
|
237
|
+
value: 192
|
|
238
|
+
});
|
|
147
239
|
class DataChunk extends Chunk {
|
|
240
|
+
get type() {
|
|
241
|
+
return DataChunk.type;
|
|
242
|
+
}
|
|
148
243
|
constructor(flags = 0, body) {
|
|
149
244
|
super(flags, body);
|
|
150
|
-
this
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
245
|
+
Object.defineProperty(this, "flags", {
|
|
246
|
+
enumerable: true,
|
|
247
|
+
configurable: true,
|
|
248
|
+
writable: true,
|
|
249
|
+
value: flags
|
|
250
|
+
});
|
|
251
|
+
Object.defineProperty(this, "tsn", {
|
|
252
|
+
enumerable: true,
|
|
253
|
+
configurable: true,
|
|
254
|
+
writable: true,
|
|
255
|
+
value: 0
|
|
256
|
+
});
|
|
257
|
+
Object.defineProperty(this, "streamId", {
|
|
258
|
+
enumerable: true,
|
|
259
|
+
configurable: true,
|
|
260
|
+
writable: true,
|
|
261
|
+
value: 0
|
|
262
|
+
});
|
|
263
|
+
Object.defineProperty(this, "streamSeqNum", {
|
|
264
|
+
enumerable: true,
|
|
265
|
+
configurable: true,
|
|
266
|
+
writable: true,
|
|
267
|
+
value: 0
|
|
268
|
+
});
|
|
269
|
+
Object.defineProperty(this, "protocol", {
|
|
270
|
+
enumerable: true,
|
|
271
|
+
configurable: true,
|
|
272
|
+
writable: true,
|
|
273
|
+
value: 0
|
|
274
|
+
});
|
|
275
|
+
Object.defineProperty(this, "userData", {
|
|
276
|
+
enumerable: true,
|
|
277
|
+
configurable: true,
|
|
278
|
+
writable: true,
|
|
279
|
+
value: Buffer.from("")
|
|
280
|
+
});
|
|
281
|
+
Object.defineProperty(this, "abandoned", {
|
|
282
|
+
enumerable: true,
|
|
283
|
+
configurable: true,
|
|
284
|
+
writable: true,
|
|
285
|
+
value: false
|
|
286
|
+
});
|
|
287
|
+
Object.defineProperty(this, "acked", {
|
|
288
|
+
enumerable: true,
|
|
289
|
+
configurable: true,
|
|
290
|
+
writable: true,
|
|
291
|
+
value: false
|
|
292
|
+
});
|
|
293
|
+
Object.defineProperty(this, "misses", {
|
|
294
|
+
enumerable: true,
|
|
295
|
+
configurable: true,
|
|
296
|
+
writable: true,
|
|
297
|
+
value: 0
|
|
298
|
+
});
|
|
299
|
+
Object.defineProperty(this, "retransmit", {
|
|
300
|
+
enumerable: true,
|
|
301
|
+
configurable: true,
|
|
302
|
+
writable: true,
|
|
303
|
+
value: false
|
|
304
|
+
});
|
|
305
|
+
Object.defineProperty(this, "sentCount", {
|
|
306
|
+
enumerable: true,
|
|
307
|
+
configurable: true,
|
|
308
|
+
writable: true,
|
|
309
|
+
value: 0
|
|
310
|
+
});
|
|
311
|
+
Object.defineProperty(this, "bookSize", {
|
|
312
|
+
enumerable: true,
|
|
313
|
+
configurable: true,
|
|
314
|
+
writable: true,
|
|
315
|
+
value: 0
|
|
316
|
+
});
|
|
317
|
+
Object.defineProperty(this, "expiry", {
|
|
318
|
+
enumerable: true,
|
|
319
|
+
configurable: true,
|
|
320
|
+
writable: true,
|
|
321
|
+
value: void 0
|
|
322
|
+
});
|
|
323
|
+
Object.defineProperty(this, "maxRetransmits", {
|
|
324
|
+
enumerable: true,
|
|
325
|
+
configurable: true,
|
|
326
|
+
writable: true,
|
|
327
|
+
value: void 0
|
|
328
|
+
});
|
|
329
|
+
Object.defineProperty(this, "sentTime", {
|
|
330
|
+
enumerable: true,
|
|
331
|
+
configurable: true,
|
|
332
|
+
writable: true,
|
|
333
|
+
value: void 0
|
|
334
|
+
});
|
|
162
335
|
if (body) {
|
|
163
336
|
[this.tsn, this.streamId, this.streamSeqNum, this.protocol] =
|
|
164
337
|
jspack_1.jspack.Unpack("!LHHL", body);
|
|
165
338
|
this.userData = body.slice(12);
|
|
166
339
|
}
|
|
167
340
|
}
|
|
168
|
-
get type() {
|
|
169
|
-
return DataChunk.type;
|
|
170
|
-
}
|
|
171
341
|
get bytes() {
|
|
172
342
|
const length = 16 + this.userData.length;
|
|
173
343
|
let data = Buffer.concat([
|
|
@@ -192,26 +362,51 @@ class DataChunk extends Chunk {
|
|
|
192
362
|
}
|
|
193
363
|
}
|
|
194
364
|
exports.DataChunk = DataChunk;
|
|
195
|
-
DataChunk
|
|
365
|
+
Object.defineProperty(DataChunk, "type", {
|
|
366
|
+
enumerable: true,
|
|
367
|
+
configurable: true,
|
|
368
|
+
writable: true,
|
|
369
|
+
value: 0
|
|
370
|
+
});
|
|
196
371
|
class CookieEchoChunk extends Chunk {
|
|
197
372
|
get type() {
|
|
198
373
|
return CookieEchoChunk.type;
|
|
199
374
|
}
|
|
200
375
|
}
|
|
201
376
|
exports.CookieEchoChunk = CookieEchoChunk;
|
|
202
|
-
CookieEchoChunk
|
|
377
|
+
Object.defineProperty(CookieEchoChunk, "type", {
|
|
378
|
+
enumerable: true,
|
|
379
|
+
configurable: true,
|
|
380
|
+
writable: true,
|
|
381
|
+
value: 10
|
|
382
|
+
});
|
|
203
383
|
class CookieAckChunk extends Chunk {
|
|
204
384
|
get type() {
|
|
205
385
|
return CookieAckChunk.type;
|
|
206
386
|
}
|
|
207
387
|
}
|
|
208
388
|
exports.CookieAckChunk = CookieAckChunk;
|
|
209
|
-
CookieAckChunk
|
|
389
|
+
Object.defineProperty(CookieAckChunk, "type", {
|
|
390
|
+
enumerable: true,
|
|
391
|
+
configurable: true,
|
|
392
|
+
writable: true,
|
|
393
|
+
value: 11
|
|
394
|
+
});
|
|
210
395
|
class BaseParamsChunk extends Chunk {
|
|
211
396
|
constructor(flags = 0, body = undefined) {
|
|
212
397
|
super(flags, body);
|
|
213
|
-
this
|
|
214
|
-
|
|
398
|
+
Object.defineProperty(this, "flags", {
|
|
399
|
+
enumerable: true,
|
|
400
|
+
configurable: true,
|
|
401
|
+
writable: true,
|
|
402
|
+
value: flags
|
|
403
|
+
});
|
|
404
|
+
Object.defineProperty(this, "params", {
|
|
405
|
+
enumerable: true,
|
|
406
|
+
configurable: true,
|
|
407
|
+
writable: true,
|
|
408
|
+
value: []
|
|
409
|
+
});
|
|
215
410
|
if (body) {
|
|
216
411
|
this.params = decodeParams(body);
|
|
217
412
|
}
|
|
@@ -227,7 +422,12 @@ class AbortChunk extends BaseParamsChunk {
|
|
|
227
422
|
}
|
|
228
423
|
}
|
|
229
424
|
exports.AbortChunk = AbortChunk;
|
|
230
|
-
AbortChunk
|
|
425
|
+
Object.defineProperty(AbortChunk, "type", {
|
|
426
|
+
enumerable: true,
|
|
427
|
+
configurable: true,
|
|
428
|
+
writable: true,
|
|
429
|
+
value: 6
|
|
430
|
+
});
|
|
231
431
|
class ErrorChunk extends BaseParamsChunk {
|
|
232
432
|
get type() {
|
|
233
433
|
return ErrorChunk.type;
|
|
@@ -240,36 +440,56 @@ class ErrorChunk extends BaseParamsChunk {
|
|
|
240
440
|
}
|
|
241
441
|
}
|
|
242
442
|
exports.ErrorChunk = ErrorChunk;
|
|
243
|
-
ErrorChunk
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
443
|
+
Object.defineProperty(ErrorChunk, "type", {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
configurable: true,
|
|
446
|
+
writable: true,
|
|
447
|
+
value: 9
|
|
448
|
+
});
|
|
449
|
+
Object.defineProperty(ErrorChunk, "CODE", {
|
|
450
|
+
enumerable: true,
|
|
451
|
+
configurable: true,
|
|
452
|
+
writable: true,
|
|
453
|
+
value: {
|
|
454
|
+
InvalidStreamIdentifier: 1,
|
|
455
|
+
MissingMandatoryParameter: 2,
|
|
456
|
+
StaleCookieError: 3,
|
|
457
|
+
OutofResource: 4,
|
|
458
|
+
UnresolvableAddress: 5,
|
|
459
|
+
UnrecognizedChunkType: 6,
|
|
460
|
+
InvalidMandatoryParameter: 7,
|
|
461
|
+
UnrecognizedParameters: 8,
|
|
462
|
+
NoUserData: 9,
|
|
463
|
+
CookieReceivedWhileShuttingDown: 10,
|
|
464
|
+
RestartofanAssociationwithNewAddresses: 11,
|
|
465
|
+
UserInitiatedAbort: 12,
|
|
466
|
+
ProtocolViolation: 13,
|
|
467
|
+
}
|
|
468
|
+
});
|
|
259
469
|
class HeartbeatChunk extends BaseParamsChunk {
|
|
260
470
|
get type() {
|
|
261
471
|
return HeartbeatChunk.type;
|
|
262
472
|
}
|
|
263
473
|
}
|
|
264
474
|
exports.HeartbeatChunk = HeartbeatChunk;
|
|
265
|
-
HeartbeatChunk
|
|
475
|
+
Object.defineProperty(HeartbeatChunk, "type", {
|
|
476
|
+
enumerable: true,
|
|
477
|
+
configurable: true,
|
|
478
|
+
writable: true,
|
|
479
|
+
value: 4
|
|
480
|
+
});
|
|
266
481
|
class HeartbeatAckChunk extends BaseParamsChunk {
|
|
267
482
|
get type() {
|
|
268
483
|
return HeartbeatAckChunk.type;
|
|
269
484
|
}
|
|
270
485
|
}
|
|
271
486
|
exports.HeartbeatAckChunk = HeartbeatAckChunk;
|
|
272
|
-
HeartbeatAckChunk
|
|
487
|
+
Object.defineProperty(HeartbeatAckChunk, "type", {
|
|
488
|
+
enumerable: true,
|
|
489
|
+
configurable: true,
|
|
490
|
+
writable: true,
|
|
491
|
+
value: 5
|
|
492
|
+
});
|
|
273
493
|
// https://tools.ietf.org/html/rfc6525#section-3.1
|
|
274
494
|
// chunkReconfig represents an SCTP Chunk used to reconfigure streams.
|
|
275
495
|
//
|
|
@@ -292,15 +512,48 @@ class ReconfigChunk extends BaseParamsChunk {
|
|
|
292
512
|
}
|
|
293
513
|
}
|
|
294
514
|
exports.ReconfigChunk = ReconfigChunk;
|
|
295
|
-
ReconfigChunk
|
|
515
|
+
Object.defineProperty(ReconfigChunk, "type", {
|
|
516
|
+
enumerable: true,
|
|
517
|
+
configurable: true,
|
|
518
|
+
writable: true,
|
|
519
|
+
value: 130
|
|
520
|
+
});
|
|
296
521
|
class SackChunk extends Chunk {
|
|
522
|
+
get type() {
|
|
523
|
+
return SackChunk.type;
|
|
524
|
+
}
|
|
297
525
|
constructor(flags = 0, body) {
|
|
298
526
|
super(flags, body);
|
|
299
|
-
this
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
527
|
+
Object.defineProperty(this, "flags", {
|
|
528
|
+
enumerable: true,
|
|
529
|
+
configurable: true,
|
|
530
|
+
writable: true,
|
|
531
|
+
value: flags
|
|
532
|
+
});
|
|
533
|
+
Object.defineProperty(this, "gaps", {
|
|
534
|
+
enumerable: true,
|
|
535
|
+
configurable: true,
|
|
536
|
+
writable: true,
|
|
537
|
+
value: []
|
|
538
|
+
});
|
|
539
|
+
Object.defineProperty(this, "duplicates", {
|
|
540
|
+
enumerable: true,
|
|
541
|
+
configurable: true,
|
|
542
|
+
writable: true,
|
|
543
|
+
value: []
|
|
544
|
+
});
|
|
545
|
+
Object.defineProperty(this, "cumulativeTsn", {
|
|
546
|
+
enumerable: true,
|
|
547
|
+
configurable: true,
|
|
548
|
+
writable: true,
|
|
549
|
+
value: 0
|
|
550
|
+
});
|
|
551
|
+
Object.defineProperty(this, "advertisedRwnd", {
|
|
552
|
+
enumerable: true,
|
|
553
|
+
configurable: true,
|
|
554
|
+
writable: true,
|
|
555
|
+
value: 0
|
|
556
|
+
});
|
|
304
557
|
if (body) {
|
|
305
558
|
const [cumulativeTsn, advertisedRwnd, nbGaps, nbDuplicates] = jspack_1.jspack.Unpack("!LLHH", body);
|
|
306
559
|
this.cumulativeTsn = cumulativeTsn;
|
|
@@ -316,9 +569,6 @@ class SackChunk extends Chunk {
|
|
|
316
569
|
});
|
|
317
570
|
}
|
|
318
571
|
}
|
|
319
|
-
get type() {
|
|
320
|
-
return SackChunk.type;
|
|
321
|
-
}
|
|
322
572
|
get bytes() {
|
|
323
573
|
const length = 16 + 4 * (this.gaps.length + this.duplicates.length);
|
|
324
574
|
let data = Buffer.from(jspack_1.jspack.Pack("!BBHLLHH", [
|
|
@@ -342,39 +592,69 @@ class SackChunk extends Chunk {
|
|
|
342
592
|
}
|
|
343
593
|
}
|
|
344
594
|
exports.SackChunk = SackChunk;
|
|
345
|
-
SackChunk
|
|
595
|
+
Object.defineProperty(SackChunk, "type", {
|
|
596
|
+
enumerable: true,
|
|
597
|
+
configurable: true,
|
|
598
|
+
writable: true,
|
|
599
|
+
value: 3
|
|
600
|
+
});
|
|
346
601
|
class ShutdownChunk extends Chunk {
|
|
602
|
+
get type() {
|
|
603
|
+
return ShutdownChunk.type;
|
|
604
|
+
}
|
|
347
605
|
constructor(flags = 0, body) {
|
|
348
606
|
super(flags, body);
|
|
349
|
-
this
|
|
350
|
-
|
|
607
|
+
Object.defineProperty(this, "flags", {
|
|
608
|
+
enumerable: true,
|
|
609
|
+
configurable: true,
|
|
610
|
+
writable: true,
|
|
611
|
+
value: flags
|
|
612
|
+
});
|
|
613
|
+
Object.defineProperty(this, "cumulativeTsn", {
|
|
614
|
+
enumerable: true,
|
|
615
|
+
configurable: true,
|
|
616
|
+
writable: true,
|
|
617
|
+
value: 0
|
|
618
|
+
});
|
|
351
619
|
if (body) {
|
|
352
620
|
this.cumulativeTsn = jspack_1.jspack.Unpack("!L", body)[0];
|
|
353
621
|
}
|
|
354
622
|
}
|
|
355
|
-
get type() {
|
|
356
|
-
return ShutdownChunk.type;
|
|
357
|
-
}
|
|
358
623
|
get body() {
|
|
359
624
|
return Buffer.from(jspack_1.jspack.Pack("!L", [this.cumulativeTsn]));
|
|
360
625
|
}
|
|
361
626
|
}
|
|
362
627
|
exports.ShutdownChunk = ShutdownChunk;
|
|
363
|
-
ShutdownChunk
|
|
628
|
+
Object.defineProperty(ShutdownChunk, "type", {
|
|
629
|
+
enumerable: true,
|
|
630
|
+
configurable: true,
|
|
631
|
+
writable: true,
|
|
632
|
+
value: 7
|
|
633
|
+
});
|
|
364
634
|
class ShutdownAckChunk extends Chunk {
|
|
365
635
|
get type() {
|
|
366
636
|
return ShutdownAckChunk.type;
|
|
367
637
|
}
|
|
368
638
|
}
|
|
369
639
|
exports.ShutdownAckChunk = ShutdownAckChunk;
|
|
370
|
-
ShutdownAckChunk
|
|
640
|
+
Object.defineProperty(ShutdownAckChunk, "type", {
|
|
641
|
+
enumerable: true,
|
|
642
|
+
configurable: true,
|
|
643
|
+
writable: true,
|
|
644
|
+
value: 8
|
|
645
|
+
});
|
|
371
646
|
class ShutdownCompleteChunk extends Chunk {
|
|
372
647
|
get type() {
|
|
373
648
|
return ShutdownCompleteChunk.type;
|
|
374
649
|
}
|
|
375
650
|
}
|
|
376
651
|
exports.ShutdownCompleteChunk = ShutdownCompleteChunk;
|
|
377
|
-
ShutdownCompleteChunk
|
|
652
|
+
Object.defineProperty(ShutdownCompleteChunk, "type", {
|
|
653
|
+
enumerable: true,
|
|
654
|
+
configurable: true,
|
|
655
|
+
writable: true,
|
|
656
|
+
value: 14
|
|
657
|
+
});
|
|
378
658
|
const CHUNK_CLASSES = [
|
|
379
659
|
DataChunk,
|
|
380
660
|
InitChunk,
|