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

Optimize socket read buffer sizes #1025

dmiller-nmap opened this Issue Oct 3, 2017 · 0 comments


None yet
1 participant

dmiller-nmap commented Oct 3, 2017

Nsock and Ncat currently use fixed buffer sizes for read and write operations. There ought to be ways to improve data transfer speeds by dynamically adjusting these buffer sizes. In most cases, this would mean switching from stack variables to heap-allocated buffers. In the case of Nsock, it might require a new API function to either set the size or set a restriction on how big they could grow. For Ncat, it's a producer-consumer problem; either the socket or stdout will be faster than the other, so detecting the limiting one and matching it is the goal.

No matter what, we have to start with a good measurement of transfer speed and only make changes that improve that and do not break our existing tests. I expect it will take several separate efforts (i.e. more than one PR) to get this issue solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment