mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
[PR #552] [MERGED] Network cleanup #7546
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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.