pipe / sctp4j Goto Github PK
View Code? Open in Web Editor NEWPure Java implementation of SCTP with webRTC data channel support
Pure Java implementation of SCTP with webRTC data channel support
I'm using a forked / modified version of your code and while I've had success with Chrome 73; I cannot get beyond this ProtocolViolation
in Firefox 66. I've searched around the web and I'm coming up with no real clues as to why this happens and any ideas you may have would be super. I can supply more debugging information if needed, but to start, here is the offer from FF:
v=0
o=2 8246836251515058280 0 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=fingerprint:sha-256 E8:2B:34:B8:1F:04:33:78:E7:BF:C2:F9:DA:3D:ED:99:37:17:A8:DC:61:F7:1F:A1:54:1A:2D:B6:B7:EC:C5:FC
a=ice-options:trickle
m=audio 9 UDP/TLS/RTP/SAVPF 109 9 0 8 101
c=IN IP4 0.0.0.0
b=AS:50
a=sendrecv
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:0
a=msid:{443a5911-c45b-4c83-87fe-37c3c842a1fc} {58abd10f-f65c-4de8-9e9e-dd6463e61551}
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000/1
a=setup:actpass
a=ssrc:1136541932 cname:{5b603705-00e8-4ead-a12d-bf7e2c3922d9}
m=video 9 UDP/TLS/RTP/SAVPF 120 121 126 97
c=IN IP4 0.0.0.0
b=AS:256
a=sendrecv
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:1
a=msid:{443a5911-c45b-4c83-87fe-37c3c842a1fc} {52621f91-860e-47e7-8113-b30def75f423}
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 ccm tmmbr
a=rtcp-fb:120 goog-remb
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 ccm tmmbr
a=rtcp-fb:121 goog-remb
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 ccm tmmbr
a=rtcp-fb:126 goog-remb
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 ccm tmmbr
a=rtcp-fb:97 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=setup:actpass
a=ssrc:2863820055 cname:{5b603705-00e8-4ead-a12d-bf7e2c3922d9}
m=application 5000 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:30f36fc88ba01471fdbe49cec57b936f
a=ice-ufrag:e868dc76
a=mid:2
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823
And the answer from the server:
v=0
o=red5pro_pub-1554410185657 5156885296754 1 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic:WMS *
a=group:BUNDLE 0 1 2
a=ice-options:trickle
m=audio 9 UDP/TLS/RTP/SAVPF 109
c=IN IP4 x.x.x.x
b=AS:50
a=rtpmap:109 opus/48000/2
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:0
a=recvonly
a=rtcp-mux
a=fmtp:109 minptime=10;useinbandfec=0;cbr=1
m=video 9 UDP/TLS/RTP/SAVPF 126
c=IN IP4 x.x.x.x
b=AS:256
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=rtpmap:126 H264/90000
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:1
a=recvonly
a=rtcp-mux
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 goog-remb
a=rtcp-fb:126 ccm tmmbr
a=fmtp:126 max-fs=12288
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 x.x.x.x
a=ice-ufrag:aoak51d7l12apm
a=ice-pwd:7ahb4jilf3vsk7h0f61hvccje7
a=fingerprint:sha-256 C3:BC:3D:3C:A3:EB:8C:FE:96:C2:63:8A:51:55:C0:D4:38:A3:E4:73:F7:3F:51:84:AE:DC:E8:57:D5:43:65:7B
a=setup:passive
a=mid:2
a=sendrecv
a=sctp-port:5000
I have a use case where I want to establish a java client-server communication via SCTP over DTLS over UDP similar to webrtc data channel.
This library looks promising.
I want to use it with java 11 and netty eventually.
Can you please provide some pointers?
Thanks for the code.
Are there any usage examples regarding how to use sctp4j
once the DTLS DatagramTransport
is available?
Am I right that the pe.pi.sctp4j.sctp.small.ThreadedAssociation
class is the main handler for processing SCTP messages received from the DTLS transport?
@steely-glint when I try to send multiple messages with sizes higher than 20-50KB back and forth, I see that the latency is high.
I am wondering if there are some benchmarks done and how are the numbers compared to TCP.
Is the license of this project apache v2, or is it GNU GPL v2?
Some files (nearly all of them) are apache v2, but some test cases are GNU GPL v2
Thank you
I was wondering if it is possible to configure the sctp socket to have a maximum of retransmit tries on a message before failing to send the message. WebRTC DataChannel have this option configurable[1].
Is there any example to show how to send video or anyOther message to a webclient,just like use webclient to webclient to share their
DesktopScreen 。
thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.