Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recommend Packer interface to improve scalability and flexibility #62

Open
uhowep opened this issue Oct 18, 2024 · 0 comments
Open

recommend Packer interface to improve scalability and flexibility #62

uhowep opened this issue Oct 18, 2024 · 0 comments

Comments

@uhowep
Copy link

uhowep commented Oct 18, 2024

It is recommended to adjust the Packer interface to improve scalability and flexibility:
for Message in Packer , use interface{} type instead of []byte for data field.

In different business scenarios, if you want to use some specific libraries for use such as pdu for smpp, the structure used by a specific library cannot be adjusted to []byte, unless an additional Marshal and Unmarshal. When using interface{} to replace []byte, it can save a time consumption of Marshal and Unmarshal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant