Rework network and server #3
Labels
Enhancement
New feature or request
In progress
Issues that are being fixed
Optimisation
Issues/PR's that outline things that need to be optimised
Slow Progress
Issues/PR's that are slowly progressing
Milestone
I am running into issues with these packages as they will randomly fail, and I personally think it's quite janky in design and it's due to be re-done for a nicer system. For every packet, I will have a struct that is used to define what the packet contains as we already know that from wiki.vg, based off that I can just use an interface with 2 methods for Decode() and Encode() that will of course link to the corresponding packet encode and decode functions. This makes the code a lot cleaner and allows me to split up the handling instead of all being in one giant clump (lots of boilerplate in the server package rn). Here is the design I've made (https://imgur.com/a/cTR7mM9). Edit: In the image, I didn't mean interface, I meant struct methods since interfaces can be used for the purpose, but it is unnecessary and makes the code more convoluted.
The text was updated successfully, but these errors were encountered: