Skip to content

Commit 77489fb

Browse files
Kas-tleRaphiMC
andauthored
Add Nethernet support (netty-transport-nethernet) (#4)
* Add transport-nethernet package Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Correct discovery packet length and properly encode discovery string length as varint Co-authored-by: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Refactor NetherNetClientChannel using RTCDataChannelObserver to succeed connectPromise Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Encourage use of single PeerConnectionFactory Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Switch to data only webrtc lib Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Refactor to support joining realms Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Fix issues with connectionId being signed in SDP strings; fix LAN server channel Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Expose ice servers in NetherNetXboxSignaling Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Remove native depends Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * More robust logging and ICE/TURN parsing Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Properly track NetherNetServerChannel state Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Prep for nethernet release Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Fix option access Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Add max retries for client connect Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Fail connect promise if target network id is not found Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Add case for Delivery Acknowledgement Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Refactor to use specific functional interfaces for all string handlers; javadoc formatting Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Use connectexception if we can't reach xbox signaling Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Complete with ConnectException if we cannot connect to xbox signaling wss; ensure signaling handler is removed on close Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Use ConnectException for handshake failure Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Update README structure Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> * Small README tweaks Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> --------- Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com> Co-authored-by: RaphiMC <50594595+RaphiMC@users.noreply.github.com>
1 parent 50bbb8e commit 77489fb

48 files changed

Lines changed: 3981 additions & 36 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
config:
3+
layout: elk
4+
theme: redux-dark
5+
---
6+
flowchartLR
7+
subgraphTransportLayer["<b>NetherNet Transport</b>"]
8+
directionTB
9+
Native["<b>WebRTC Native</b><br><i>libdatachannel</i>"]
10+
DataChannel["<b>RTCDataChannel</b><br><i>Reliability & Ordering</i>"]
11+
ClientChannel["<b>NetherNetClientChannel</b><br><i>Netty Adapter</i>"]
12+
end
13+
subgraphUserPipeline["<b>User ChannelPipeline</b>"]
14+
UserLogic["<b>User Handlers</b><br><i>Application Logic</i>"]
15+
end
16+
17+
Network(("Network (DTLS/UDP)"))
18+
Network==Encrypted Frame==>Native
19+
Native==Reassembled Message==>DataChannel
20+
DataChannel==<i>RTCDataChannelBuffer</i>==>ClientChannel
21+
ClientChannel==<i>ByteBuf</i>==>UserLogic
22+
UserLogic==<i>ByteBuf</i>==>ClientChannel
23+
ClientChannel==<i>RTCDataChannelBuffer</i>==>DataChannel
24+
DataChannel==Message==>Native
25+
Native==Encrypted Frame==>Network
26+
Native:::shared
27+
DataChannel:::shared
28+
ClientChannel:::shared
29+
30+
classDefsharedfill:#e67e22,stroke:#333,stroke-width:2px
31+
32+
linkStyle0stroke:#2ecc71,stroke-width:4px,color:#2ecc71
33+
linkStyle1stroke:#2ecc71,stroke-width:4px,color:#2ecc71
34+
linkStyle2stroke:#2ecc71,stroke-width:4px,color:#2ecc71
35+
linkStyle3stroke:#2ecc71,stroke-width:4px,color:#2ecc71
36+
37+
linkStyle4stroke:#3498db,stroke-width:4px,color:#3498db
38+
linkStyle5stroke:#3498db,stroke-width:4px,color:#3498db
39+
linkStyle6stroke:#3498db,stroke-width:4px,color:#3498db
40+
linkStyle7stroke:#3498db,stroke-width:4px,color:#3498db

‎.github/readme/nethernet_client_dark.svg‎

Lines changed: 102 additions & 0 deletions
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
config:
3+
layout: elk
4+
theme: redux
5+
---
6+
flowchartLR
7+
subgraphTransportLayer["<b>NetherNet Transport</b>"]
8+
directionTB
9+
Native["<b>WebRTC Native</b><br><i>libdatachannel</i>"]
10+
DataChannel["<b>RTCDataChannel</b><br><i>Reliability & Ordering</i>"]
11+
ClientChannel["<b>NetherNetClientChannel</b><br><i>Netty Adapter</i>"]
12+
end
13+
subgraphUserPipeline["<b>User ChannelPipeline</b>"]
14+
UserLogic["<b>User Handlers</b><br><i>Application Logic</i>"]
15+
end
16+
17+
Network(("Network (DTLS/UDP)"))
18+
Network==Encrypted Frame==>Native
19+
Native==Reassembled Message==>DataChannel
20+
DataChannel==<i>RTCDataChannelBuffer</i>==>ClientChannel
21+
ClientChannel==<i>ByteBuf</i>==>UserLogic
22+
UserLogic==<i>ByteBuf</i>==>ClientChannel
23+
ClientChannel==<i>RTCDataChannelBuffer</i>==>DataChannel
24+
DataChannel==Message==>Native
25+
Native==Encrypted Frame==>Network
26+
Native:::shared
27+
DataChannel:::shared
28+
ClientChannel:::shared
29+
30+
classDefsharedfill:#e67e22,stroke:#333,stroke-width:2px
31+
32+
linkStyle0stroke:#2ecc71,stroke-width:4px,color:#2ecc71
33+
linkStyle1stroke:#2ecc71,stroke-width:4px,color:#2ecc71
34+
linkStyle2stroke:#2ecc71,stroke-width:4px,color:#2ecc71
35+
linkStyle3stroke:#2ecc71,stroke-width:4px,color:#2ecc71
36+
37+
linkStyle4stroke:#3498db,stroke-width:4px,color:#3498db
38+
linkStyle5stroke:#3498db,stroke-width:4px,color:#3498db
39+
linkStyle6stroke:#3498db,stroke-width:4px,color:#3498db
40+
linkStyle7stroke:#3498db,stroke-width:4px,color:#3498db

‎.github/readme/nethernet_client_light.svg‎

Lines changed: 102 additions & 0 deletions
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
config:
3+
layout: elk
4+
theme: redux-dark
5+
---
6+
flowchartLR
7+
subgraphTransportLayer["<b>NetherNet Transport</b>"]
8+
directionTB
9+
Native["<b>WebRTC Native</b><br><i>libdatachannel</i>"]
10+
DataChannel["<b>RTCDataChannel</b><br><i>Reliability & Ordering</i>"]
11+
ChildChannel["<b>NetherNetChildChannel</b><br><i>Netty Adapter</i>"]
12+
end
13+
subgraphUserPipeline["<b>User ChannelPipeline</b>"]
14+
UserLogic["<b>User Handlers</b><br><i>Application Logic</i>"]
15+
end
16+
17+
Network(("Network (DTLS/UDP)"))
18+
19+
%% Inbound
20+
Network==Encrypted Frame==>Native
21+
Native==Reassembled Message==>DataChannel
22+
DataChannel==<i>RTCDataChannelBuffer</i>==>ChildChannel
23+
ChildChannel==<i>ByteBuf</i>==>UserLogic
24+
25+
%% Outbound
26+
UserLogic==<i>ByteBuf</i>==>ChildChannel
27+
ChildChannel==<i>RTCDataChannelBuffer</i>==>DataChannel
28+
DataChannel==Message==>Native
29+
Native==Encrypted Frame==>Network
30+
31+
%% Styling
32+
Native:::shared
33+
DataChannel:::shared
34+
ChildChannel:::shared
35+
36+
classDefsharedfill:#e67e22,stroke:#333,stroke-width:2px
37+
38+
linkStyle0stroke:#2ecc71,stroke-width:4px,color:#2ecc71
39+
linkStyle1stroke:#2ecc71,stroke-width:4px,color:#2ecc71
40+
linkStyle2stroke:#2ecc71,stroke-width:4px,color:#2ecc71
41+
linkStyle3stroke:#2ecc71,stroke-width:4px,color:#2ecc71
42+
43+
linkStyle4stroke:#3498db,stroke-width:4px,color:#3498db
44+
linkStyle5stroke:#3498db,stroke-width:4px,color:#3498db
45+
linkStyle6stroke:#3498db,stroke-width:4px,color:#3498db
46+
linkStyle7stroke:#3498db,stroke-width:4px,color:#3498db

‎.github/readme/nethernet_server_dark.svg‎

Lines changed: 102 additions & 0 deletions
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
config:
3+
layout: elk
4+
theme: redux
5+
---
6+
flowchartLR
7+
subgraphTransportLayer["<b>NetherNet Transport</b>"]
8+
directionTB
9+
Native["<b>WebRTC Native</b><br><i>libdatachannel</i>"]
10+
DataChannel["<b>RTCDataChannel</b><br><i>Reliability & Ordering</i>"]
11+
ChildChannel["<b>NetherNetChildChannel</b><br><i>Netty Adapter</i>"]
12+
end
13+
subgraphUserPipeline["<b>User ChannelPipeline</b>"]
14+
UserLogic["<b>User Handlers</b><br><i>Application Logic</i>"]
15+
end
16+
17+
Network(("Network (DTLS/UDP)"))
18+
Network==Encrypted Frame==>Native
19+
Native==Reassembled Message==>DataChannel
20+
DataChannel==<i>RTCDataChannelBuffer</i>==>ChildChannel
21+
ChildChannel==<i>ByteBuf</i>==>UserLogic
22+
UserLogic==<i>ByteBuf</i>==>ChildChannel
23+
ChildChannel==<i>RTCDataChannelBuffer</i>==>DataChannel
24+
DataChannel==Message==>Native
25+
Native==Encrypted Frame==>Network
26+
Native:::shared
27+
DataChannel:::shared
28+
ChildChannel:::shared
29+
30+
classDefsharedfill:#e67e22,stroke:#333,stroke-width:2px
31+
32+
linkStyle0stroke:#2ecc71,stroke-width:4px,color:#2ecc71
33+
linkStyle1stroke:#2ecc71,stroke-width:4px,color:#2ecc71
34+
linkStyle2stroke:#2ecc71,stroke-width:4px,color:#2ecc71
35+
linkStyle3stroke:#2ecc71,stroke-width:4px,color:#2ecc71
36+
37+
linkStyle4stroke:#3498db,stroke-width:4px,color:#3498db
38+
linkStyle5stroke:#3498db,stroke-width:4px,color:#3498db
39+
linkStyle6stroke:#3498db,stroke-width:4px,color:#3498db
40+
linkStyle7stroke:#3498db,stroke-width:4px,color:#3498db

‎.github/readme/nethernet_server_light.svg‎

Lines changed: 102 additions & 0 deletions
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
config:
3+
layout: elk
4+
theme: redux-dark
5+
---
6+
flowchartLR
7+
subgraphInternalPipeline["<b>RakNet Internal Pipeline</b><br>(Parent DatagramChannel)"]
8+
directionTB
9+
ProxyRoute["<b>RakClientProxyRouteHandler</b><br><i>Routes to/from Client Channel</i>"]
10+
DatagramCodec["<b>RakDatagramCodec</b><br><i>Encodes/Decodes<br>RakNet Datagrams</i>"]
11+
AckHandler["<b>RakAcknowledgeHandler</b><br><i>Manages ACKs/NACKs</i>"]
12+
SessionCodec["<b>RakSessionCodec</b><br><i>Reliability, Ordering,<br>Split Packets</i>"]
13+
end
14+
subgraphUserPipeline["<b>User ChannelPipeline</b><br>(RakClientChannel)"]
15+
UserLogic["<b>User Handlers</b><br><i>Application Logic</i>"]
16+
end
17+
Network(("Network Socket"))==Inbound <i>UDP Datagram</i>==>DatagramCodec
18+
DatagramCodec==<i>EncapsulatedPacket</i>==>AckHandler
19+
AckHandler==<i>EncapsulatedPacket</i>==>SessionCodec&DatagramCodec
20+
SessionCodec==<i>ByteBuf</i>==>ProxyRoute
21+
ProxyRoute==<i>ByteBuf</i>==>UserLogic&SessionCodec
22+
UserLogic==<i>ByteBuf</i>==>ProxyRoute
23+
SessionCodec==<i>EncapsulatedPacket</i>==>AckHandler
24+
DatagramCodec==Outbound <i>UDP Datagram</i>==>Network
25+
26+
ProxyRoute:::shared
27+
DatagramCodec:::shared
28+
AckHandler:::shared
29+
SessionCodec:::shared
30+
classDefsharedfill:#9b59b6,stroke:#333,stroke-width:2px
31+
linkStyle0stroke:#2ecc71,stroke-width:4px,color:#2ecc71,fill:none
32+
linkStyle1stroke:#2ecc71,stroke-width:4px,color:#2ecc71,fill:none
33+
linkStyle2stroke:#2ecc71,stroke-width:4px,color:#2ecc71,fill:none
34+
linkStyle3stroke:#3498db,stroke-width:4px,color:#3498db,fill:none
35+
linkStyle4stroke:#2ecc71,stroke-width:4px,color:#2ecc71,fill:none
36+
linkStyle5stroke:#2ecc71,stroke-width:4px,color:#2ecc71,fill:none
37+
linkStyle6stroke:#3498db,stroke-width:4px,color:#3498db,fill:none
38+
linkStyle7stroke:#3498db,stroke-width:4px,color:#3498db,fill:none
39+
linkStyle8stroke:#3498db,stroke-width:4px,color:#3498db,fill:none
40+
linkStyle9stroke:#3498db,stroke-width:4px,color:#3498db,fill:none

‎.github/readme/raknet_client_dark.svg‎

Lines changed: 102 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)