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
I'm not sure this fits the goals for the project but I will put it here for comments.
What is this feature about?
Long term I think it would be nice to both serialize and de-serialize packets. As it currently stands we serialize requests in plain functions with no input data (in most cases), and de-serialize responses to a struct but in a standalone function. I imagine a nice abstraction would be like the serde Serialize, and Deserialize traits where both requests and responses can be created from Vec<u8> and serialized into Vec<u8>.
Use cases
This would enable people to use the library to create pseudo-game servers (I'm not suggesting we implement any of the server logic here). But this could be useful for testing: we could implement a pseudo-server and query ourselves using node-gamedig and rust-gamedig and compare outputs.
The text was updated successfully, but these errors were encountered:
I think a similar design could definitely be used for gamedig, and it could make writing new protocols simpler.
It would definitely be a lot of work though especially with us needing to encode as well as decode types. And I'm not sure if there would be a performance detriment that makes this not worth it.
Woah, that indeed looks great.
But sometimes when we decode a packet there are other conditional steps (e.g. additional data, stuff that needs to be mutated, decoding in another order etc) so I don't think we could apply something like this for all of our use cases (some yes but not all) but for sure it's something that might be worth to look into.
I'm not sure this fits the goals for the project but I will put it here for comments.
What is this feature about?
Long term I think it would be nice to both serialize and de-serialize packets. As it currently stands we serialize requests in plain functions with no input data (in most cases), and de-serialize responses to a struct but in a standalone function. I imagine a nice abstraction would be like the serde
Serialize
, andDeserialize
traits where both requests and responses can be created fromVec<u8>
and serialized intoVec<u8>
.Use cases
This would enable people to use the library to create pseudo-game servers (I'm not suggesting we implement any of the server logic here). But this could be useful for testing: we could implement a pseudo-server and query ourselves using node-gamedig and rust-gamedig and compare outputs.
The text was updated successfully, but these errors were encountered: