Thank you for building this awesome library. I'm seeing this weird issue where if we start Simultaneous 2 TCP connections to the server, the sever issue RSTs and close the TCP connections, but this doesn't happen if we open like more than 2 simultaneous TCP connections at same time.
I'm using Ubuntu OS. I observe the same issue on the evpp library, but I don't think this is library specific.
The following NodeJS script is used to send Simultaneous TCP connections. You don't need to write a HTTP server stack to test this, just the usual TCP code with do nothing while loop to keep socket from destructuring. I'm using 5 threads in the C++ server.
const request = require('request-promise');
async function main() {
try {
// 2 requests at same time fails
const urls = [
"https://YOUR_IP:PORT",
"https://YOUR_IP:PORT",
]
const requests = [];
for(const url of urls) {
requests.push(request.get(url));
}
let res = await Promise.race(requests);
} catch (e) {
console.log(e);
}
}
main();
Please do let me know if you need the threaded wrapper that I wrote around your low level lib.
@fpagliughi
Thank you for building this awesome library. I'm seeing this weird issue where if we start Simultaneous 2 TCP connections to the server, the sever issue RSTs and close the TCP connections, but this doesn't happen if we open like more than 2 simultaneous TCP connections at same time.
I'm using Ubuntu OS. I observe the same issue on the evpp library, but I don't think this is library specific.
I did compile with these flags too
-Wpedantic -Wthread-safety -Wall -Wextra -g -fsanitize=undefined -fsanitize=address -fsanitize=leak
But they detected nothing, and so is Valgrind
The following NodeJS script is used to send Simultaneous TCP connections. You don't need to write a HTTP server stack to test this, just the usual TCP code with do nothing while loop to keep socket from destructuring. I'm using 5 threads in the C++ server.
Please do let me know if you need the threaded wrapper that I wrote around your low level lib.