This repository was archived by the owner on Dec 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Support Kotlin Serialization for Netty Packets #24
Copy link
Copy link
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.
Milestone
Description
Is your feature request related to a problem?
Yes. Currently, Netty packets require custom or manual serialization mechanisms, which can become repetitive and error-prone. This limitation makes it harder to leverage modern Kotlin features and libraries, especially in projects that already use Kotlin serialization extensively for data handling.
Describe the solution you'd like.
Enable support for writing and serializing Netty packets using Kotlin serialization. Ideally, this would involve:
- Defining packet data classes with
@Serializable - Utilizing
kotlinx.serializationto encode/decode packets to ByteBuf - Seamless integration into the existing Netty pipeline for reading/writing these packets
This approach should work without significantly modifying Netty internals and should be configurable or pluggable.
Describe alternatives you've considered.
- Manually implementing serialization/deserialization using ByteBuf (tedious and error-prone)
- Using other libraries like Jackson or Protobuf (adds complexity and breaks uniformity in a Kotlin-centric codebase)
- Writing a custom abstraction layer (duplicating features already available in kotlinx.serialization)
Other
This would make packet serialization much more idiomatic for Kotlin developers and streamline networking logic in Kotlin-based Netty projects. Could also open doors for multiplatform-friendly packet systems.
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.
Type
Projects
Status
Done