-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Custom parser support #234
Comments
After considering all the possibilities to solve this issue I came to think that we should simply implement the msgpack parser as an enum based solution. enum Parser {
Common(CommongParser),
#[cfg(feature = "msgpack-parser")]
MsgPack(MsgPackParser),
}
/// Public API implemented for Parser and delegating the actions either to the
/// `CommongParser` or the `MsgPackParser` based on a flag in the configuration. My other points for this solution are:
@FabianHummel what are your thoughts on this? As you already started to implement something. |
Using enums sounds good to me, especially because they are on the stack which is far bettern than trait objects. When people want to implement other parsers they could then simply open a PR and try to get them officially added to the parser list. Honestly, I haven't worked on this PR for a while now, but I'll consider taking a look and try to come up with something that can be worked with. Thanks for the suggestion! |
Is your feature request related to a problem? Please describe.
It is currently impossible to use external parser like
msgpack
. Moreover, usingmsgpack
as a parser is a way do solve issue #232 because binary packets withmsgpack
are sent in onews
frame.Describe the solution you'd like
Parser
that is held by theSocketIoConfig
and set with thewith_parser
fnClient
to encode/decode packets.The text was updated successfully, but these errors were encountered: