I use an embedded IP stack on my device (it is a uIP clone). It runs on a microcontroller with limited resources. This stack currently only works as HTTP server (the device has built in small web server with minified pages and small files).
When my server handles HTTP requests from clients (browsers), it sends the data to the client normally but waits for an acknowledge each time a single TCP packet is sent out. But the acknowledge from client (browser) usually comes after 50ms. I was looking for what this could cause and why acknowledge wouldn't come sooner. After all, 50ms is a very long time. And I found that this is caused by TCP delayed acknowledgments, https://en.wikipedia.org/wiki/TCP_delayed_acknowledgment.
The question now is how to disable this in operating systems on which these browsers are running. Eg. as part of establishing communication (SYN and SYNACK packets). To instruct them not to wait with the acknowledges, but to send them immediately.
I know from other answers that these ACKs can be individually disabled for each OS, (eg. in Linux Disable TCP Delayed ACKs), but I need to disable it on my side, ie on the server side. And reliably for every connected client. Just for the communication with my device.
I also know that support for these delayed ACKs could be added to my embedded IP stack but I don't want to do this (eg. to send more data without waiting for an ACK). I also know that another embedded stack could be used, which might already have that support (newer lwIP seems to have that one), but that I don't want either.
I'm not aware of such feature in the TCP protocol (to be able to turn the delayed ACKs off from server side) but maybe I'm missing something?