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

Parser should return how many bytes are needed. #20

Open
reitermarkus opened this issue May 12, 2022 · 1 comment
Open

Parser should return how many bytes are needed. #20

reitermarkus opened this issue May 12, 2022 · 1 comment

Comments

@reitermarkus
Copy link
Collaborator

Currently, when the buffer length is < 6, None is returned. Instead, the parser should return the minimum number of bytes needed to progress, similar to nom's Err::Incomplete variant.

@lkolbly
Copy link
Collaborator

lkolbly commented Sep 11, 2022

Thanks! Yes, the current parser I think can be greatly improved. I have a somewhat lower-level parser which I prototyped (see protocol::BufferHeadContents in the lkolbly/parse-buffer branch). Once we have a better handle on dealing with multiple protocol versions, I think this'll be the next thing I look at.

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

2 participants