-
Hi, I was inspecting packet using wireshark and found that sending chunks of data using Is there a way to close the connection after Thanks Snippet const uWS = require('uWebSockets.js');
const port = 7512;
const app = uWS.App({
}).get('/tryEnd', (res, req) => {
// Does not send FIN packet, only IDLE Timeout clears the connection
res.tryEnd('Hello world');
}).get('/end', (res, req) => {
res.end('Hello world', true);
}).listen(port, (token) => {
if (token) {
console.log('Listening to port ' + port);
} else {
console.log('Failed to listen to port ' + port);
}
}); uWebsocket.js : 20.6.0 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
You are missing the 2nd tryEnd parameter totalSize |
Beta Was this translation helpful? Give feedback.
-
end() got a closeConnection parameter added recently but tryEnd did not get it, it can be added to tryEnd also |
Beta Was this translation helpful? Give feedback.
-
It looks like bad design, you want to close connections to Azure Gateway, instead of reusing one connection for many clients, open connections should remain in Azure Gateway free connection pool, that's the point of load balancing |
Beta Was this translation helpful? Give feedback.
It looks like bad design, you want to close connections to Azure Gateway, instead of reusing one connection for many clients, open connections should remain in Azure Gateway free connection pool, that's the point of load balancing