MCProtocolLib/protocol
Alex 4148fa9b1f
Some checks failed
Java CI with Gradle / build (push) Has been cancelled
Deploy / build (push) Has been cancelled
Static sizer and timeout handlers in the pipeline (#833)
* Improve pipeline

This simplifies all pipeline code and ensures some listeners like the sizer are always present. The code already assumed that the sizer is always there and thus causes issues. The sizer can be deactivated still now and has pretty much no performance losses from this. The profit from this PR is that there is less logic with modifying the PR and thus developers interacting with the channel can assume specific things about the order and placements of elements in the pipeline. This will be useful once ViaVersion is supported, and it is expected that certain elements always are in the pipeline and don't change. My plan is to also always have an encryption and compression handler in the pipeline that is controlled via AttributeKeys from netty, but for that first #828 needs to be merged. So this PR only completes the goal partially, but that's fine. PR is ready for review like it is right now.

* Revert some stuff

* Fix channel race condition

* Fix closing race condition

* Prevent client race conditions.

* Fix test failure, idk how, idk why, but it works now

* Address review

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/BuiltinFlags.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

* Update protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java

Co-authored-by: chris <github@onechris.mozmail.com>

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
2024-09-10 15:16:58 +08:00
..
src Static sizer and timeout handlers in the pipeline (#833) 2024-09-10 15:16:58 +08:00
build.gradle.kts Add slf4j to tests (#834) 2024-06-18 17:14:41 +02:00