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

Apply the max payload option when encoding packets #113

Closed
Totodore opened this issue Oct 17, 2023 · 0 comments · Fixed by #114
Closed

Apply the max payload option when encoding packets #113

Totodore opened this issue Oct 17, 2023 · 0 comments · Fixed by #114
Labels
bug Something isn't working

Comments

@Totodore
Copy link
Owner

Totodore commented Oct 17, 2023

Currently the max_payload option is only applied when decoding incoming requests (with polling transport).

It also must be applied when encoding payload. It may be done by using peekable streams on the tokio receiver. It allows us to calculate the future size of the payload when adding a packet without polling it out of the channel.

If there is not enough remaining space we must stop the encoding process

Otherwise we can continue to poll packets and add them to the payload.

@Totodore Totodore added bug Something isn't working help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 17, 2023
@Totodore Totodore linked a pull request Oct 18, 2023 that will close this issue
Totodore added a commit that referenced this issue Oct 18, 2023
fix: apply max payload option when encoding (fix #113)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant