From 2a2458f746c888aa49c50d3a1c7ab2e978729c2d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 29 Aug 2025 22:21:14 +0000 Subject: set/clear Nagle depending on realtime only --- src/tipideed/stream.c | 2 -- src/tipideed/tipideed.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tipideed') diff --git a/src/tipideed/stream.c b/src/tipideed/stream.c index 917b0e0..5d368b2 100644 --- a/src/tipideed/stream.c +++ b/src/tipideed/stream.c @@ -109,12 +109,10 @@ void stream_infinite (int fd, char const *fn, uint32_t flags) void cork (int fd) { - socket_tcpdelay(fd) ; } void uncork (int fd) { - socket_tcpnodelay(fd) ; } void stream_fixed (int fd, uint64_t n, char const *fn, uint32_t flags) diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index 6cfd4ec..37e93b2 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -301,6 +302,9 @@ static inline int serve (tipidee_rql *rql, char const *docroot, char *uribuf, ti if (rql->m == TIPIDEE_METHOD_OPTIONS) return respond_options(rql, 2 | !!(ra.flags & TIPIDEE_RA_FLAG_CGI)) ; + if (ra.flags & TIPIDEE_RA_FLAG_REALTIME) socket_tcpnodelay(1) ; + else socket_tcpdelay(1) ; + tipidee_log_resource(g.logv, rql, fn, &ra, infopath) ; if (g.tarpit) millisleep(g.tarpit) ; -- cgit v1.3.1