This replaces the mina 1.1.7 networking with Netty 4.0.34 final. The implementation is based on apollo. With changes differing in the GameSession and LoginSession classes.
The packet decoders were redesigned to work off of a packet object and read directly from the channel buffer rather than doing the array copying to getInstream() like they had previously. This allows the networking to be on a different thread and decode into packet objects which can be processed on the game thread.
Optimally the stream.java would be removed and packets would be constructed for outgoing messages as well (like hyperion). However that is outside the scope of this PR which is just the networking implementation.
Please report any issues here so that they can get taken care of.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/2006-Scape/2006Scape/pull/552
**Author:** [@advnau](https://github.com/advnau)
**Created:** 1/27/2023
**Status:** ✅ Merged
**Merged:** 1/28/2023
**Merged by:** [@Dark98](https://github.com/Dark98)
**Base:** `master` ← **Head:** `network_cleanup`
---
### 📝 Commits (10+)
- [`7ea4be9`](https://github.com/2006-Scape/2006Scape/commit/7ea4be93a69aaa6c932078e05a5d4f03f15c4ec3) Replaced packetType/Size with packet
- [`0d75225`](https://github.com/2006-Scape/2006Scape/commit/0d75225fb751c18da710873db750500aea3269e2) Replace Instream with Packet
- [`2726022`](https://github.com/2006-Scape/2006Scape/commit/27260228a7a85e89efb3d6abdbd9422a195fffbd) Update Packet.java
- [`c6cdd6d`](https://github.com/2006-Scape/2006Scape/commit/c6cdd6d5777070f7d47dc6ba5f4f8f8aaf463a69) Moved packet sizes.
- [`91eef16`](https://github.com/2006-Scape/2006Scape/commit/91eef16d8de826991a523ee9d7b393be82c718b0) Removed unused stream methods
- [`2faefae`](https://github.com/2006-Scape/2006Scape/commit/2faefaec15e508fe0c1b2cf54194fc47758aa684) Added readhex method for buttons
- [`d6b43fe`](https://github.com/2006-Scape/2006Scape/commit/d6b43fe4199bc0d779f6513dff55994db6977eeb) Merge branch '2006-Scape:master' into network_cleanup
- [`ca13362`](https://github.com/2006-Scape/2006Scape/commit/ca13362dfa70fab869208e6ec99d0a63ab6b251c) preparing to replace mina
- [`35aba61`](https://github.com/2006-Scape/2006Scape/commit/35aba612ae5a3a0ff215cfea701cb0abad762977) Packet->GamePacket for refactoring
- [`3c62b53`](https://github.com/2006-Scape/2006Scape/commit/3c62b53a6f8088ec1ebc3bc1bea9be2459d3c6e1) Netty 3.6.6
### 📊 Changes
**193 files changed** (+9788 additions, -4048 deletions)
<details>
<summary>View changed files</summary>
📝 `2006Scape Client/src/main/java/ClientSettings.java` (+7 -0)
📝 `2006Scape Client/src/main/java/OnDemandFetcher.java` (+1 -1)
➕ `2006Scape Server/data/net.xml` (+12 -0)
📝 `2006Scape Server/pom.xml` (+6 -17)
📝 `2006Scape Server/src/main/java/com/rs2/GameEngine.java` (+18 -38)
📝 `2006Scape Server/src/main/java/com/rs2/game/bots/Bot.java` (+10 -6)
📝 `2006Scape Server/src/main/java/com/rs2/game/dialogues/Dialogue.java` (+2 -1)
📝 `2006Scape Server/src/main/java/com/rs2/game/players/Client.java` (+9 -7)
📝 `2006Scape Server/src/main/java/com/rs2/game/players/Player.java` (+33 -90)
📝 `2006Scape Server/src/main/java/com/rs2/game/players/PlayerHandler.java` (+1 -4)
➖ `2006Scape Server/src/main/java/com/rs2/net/CodecFactory.java` (+0 -40)
📝 `2006Scape Server/src/main/java/com/rs2/net/ConnectionHandler.java` (+72 -59)
➖ `2006Scape Server/src/main/java/com/rs2/net/ConnectionThrottleFilter.java` (+0 -132)
➖ `2006Scape Server/src/main/java/com/rs2/net/GameCodecFactory.java` (+0 -46)
➕ `2006Scape Server/src/main/java/com/rs2/net/GameDecoderState.java` (+28 -0)
📝 `2006Scape Server/src/main/java/com/rs2/net/HostList.java` (+79 -46)
📝 `2006Scape Server/src/main/java/com/rs2/net/Packet.java` (+340 -172)
➖ `2006Scape Server/src/main/java/com/rs2/net/PacketBuffer.java` (+0 -104)
➖ `2006Scape Server/src/main/java/com/rs2/net/PacketBuilder.java` (+0 -10)
📝 `2006Scape Server/src/main/java/com/rs2/net/PacketSender.java` (+2 -1)
_...and 80 more files_
</details>
### 📄 Description
This replaces the mina 1.1.7 networking with Netty 4.0.34 final. The implementation is based on apollo. With changes differing in the GameSession and LoginSession classes.
The packet decoders were redesigned to work off of a packet object and read directly from the channel buffer rather than doing the array copying to getInstream() like they had previously. This allows the networking to be on a different thread and decode into packet objects which can be processed on the game thread.
Optimally the stream.java would be removed and packets would be constructed for outgoing messages as well (like hyperion). However that is outside the scope of this PR which is just the networking implementation.
Please report any issues here so that they can get taken care of.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/2006-Scape/2006Scape/pull/552
Author: @advnau
Created: 1/27/2023
Status: ✅ Merged
Merged: 1/28/2023
Merged by: @Dark98
Base:
master← Head:network_cleanup📝 Commits (10+)
7ea4be9Replaced packetType/Size with packet0d75225Replace Instream with Packet2726022Update Packet.javac6cdd6dMoved packet sizes.91eef16Removed unused stream methods2faefaeAdded readhex method for buttonsd6b43feMerge branch '2006-Scape:master' into network_cleanupca13362preparing to replace mina35aba61Packet->GamePacket for refactoring3c62b53Netty 3.6.6📊 Changes
193 files changed (+9788 additions, -4048 deletions)
View changed files
📝
2006Scape Client/src/main/java/ClientSettings.java(+7 -0)📝
2006Scape Client/src/main/java/OnDemandFetcher.java(+1 -1)➕
2006Scape Server/data/net.xml(+12 -0)📝
2006Scape Server/pom.xml(+6 -17)📝
2006Scape Server/src/main/java/com/rs2/GameEngine.java(+18 -38)📝
2006Scape Server/src/main/java/com/rs2/game/bots/Bot.java(+10 -6)📝
2006Scape Server/src/main/java/com/rs2/game/dialogues/Dialogue.java(+2 -1)📝
2006Scape Server/src/main/java/com/rs2/game/players/Client.java(+9 -7)📝
2006Scape Server/src/main/java/com/rs2/game/players/Player.java(+33 -90)📝
2006Scape Server/src/main/java/com/rs2/game/players/PlayerHandler.java(+1 -4)➖
2006Scape Server/src/main/java/com/rs2/net/CodecFactory.java(+0 -40)📝
2006Scape Server/src/main/java/com/rs2/net/ConnectionHandler.java(+72 -59)➖
2006Scape Server/src/main/java/com/rs2/net/ConnectionThrottleFilter.java(+0 -132)➖
2006Scape Server/src/main/java/com/rs2/net/GameCodecFactory.java(+0 -46)➕
2006Scape Server/src/main/java/com/rs2/net/GameDecoderState.java(+28 -0)📝
2006Scape Server/src/main/java/com/rs2/net/HostList.java(+79 -46)📝
2006Scape Server/src/main/java/com/rs2/net/Packet.java(+340 -172)➖
2006Scape Server/src/main/java/com/rs2/net/PacketBuffer.java(+0 -104)➖
2006Scape Server/src/main/java/com/rs2/net/PacketBuilder.java(+0 -10)📝
2006Scape Server/src/main/java/com/rs2/net/PacketSender.java(+2 -1)...and 80 more files
📄 Description
This replaces the mina 1.1.7 networking with Netty 4.0.34 final. The implementation is based on apollo. With changes differing in the GameSession and LoginSession classes.
The packet decoders were redesigned to work off of a packet object and read directly from the channel buffer rather than doing the array copying to getInstream() like they had previously. This allows the networking to be on a different thread and decode into packet objects which can be processed on the game thread.
Optimally the stream.java would be removed and packets would be constructed for outgoing messages as well (like hyperion). However that is outside the scope of this PR which is just the networking implementation.
Please report any issues here so that they can get taken care of.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.