You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Main reason for this is that the github.com/mixcode/binarystruct library does a ton of allocations and is quite slow compared to encoding/binary. It cuts down on boilerplate and is convenient for speeding up development but ultimately doing it manually is better. It would also be easier to test if the packet encoding/decoding is separate from the handlers.
Packets should have a Marshal and Unmarshal method:
Main reason for this is that the
github.com/mixcode/binarystruct
library does a ton of allocations and is quite slow compared toencoding/binary
. It cuts down on boilerplate and is convenient for speeding up development but ultimately doing it manually is better. It would also be easier to test if the packet encoding/decoding is separate from the handlers.Packets should have a
Marshal
andUnmarshal
method:The text was updated successfully, but these errors were encountered: