-
Notifications
You must be signed in to change notification settings - Fork 24
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
User-configurable buffer sizes #13
Comments
Hi @RonaldEnsing, thanks for reaching out! The short answer is that I removed it because it didn't work. The longer answer is that the challenge is that the buffer size needs to be defined at compile time, since it's used to define some fixed-size arrays. So when One solution here would be to have the various classes be templated on the buffer size. However, that would require converting (at least much of) the project to a header-only implementation. My reasoning was that rather than go that route, it would just require that those users (hopefully a small subset) who need to set custom header sizes would need to include Perhaps a good compromise would be to put something like what I had before back in, which would allow those users to still include |
Thanks for the explanation. Is see your point. That makes sense. Other similar packages, like for example udp_com [1] have something similar, they simply set the buffer to such a large value that it is less likely to run into issues. [1] https://github.com/continental/udp_com/blob/main/src/udp_com.cpp#L39 |
Could you elaborate why these fixed size arrays are required at compile time? |
Would it make sense to pass these parameters in the constructor so that these can be overloaded? |
ping @dpkoch |
Creating from comment by @RonaldEnsing on #1:
The text was updated successfully, but these errors were encountered: