From c265febd97e940e6580ae42aa648358a0a2ed830 Mon Sep 17 00:00:00 2001 From: Eric Marsden Date: Wed, 11 Dec 2024 16:59:45 +0100 Subject: Add support for TCP_NODELAY on network streams * src/process.c (socket_options): add entry for TCP_NODELAY. * lisp/emacs-lisp/bytecomp.el: add :nodelay to valid keywords for make-network-process compiler-macro. * doc/lispref/processes.texi: document :nodelay keyword argument to set-network-process-option and make-network-process. (Bug#74793) --- doc/lispref/processes.texi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 79ef959ae65..e0d71ac22b6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -3090,6 +3090,13 @@ listening on that port. If @var{reuseaddr-flag} is @code{nil}, there may be a period of time after the last use of that port (by any process on the host) where it is not possible to make a new server on that port. + +@item :nodelay @var{nodelay-flag} +If @var{nodelay-flag} is non-@code{nil}, the @code{TCP_NODELAY} option +is enabled on the socket. This disables the Nagle algorithm, meaning +that network segments are sent as soon as possible, even when they +contain little data. This reduces network latency on the network +connection, but can lead to many small packets being sent. @end table @defun set-network-process-option process option value &optional no-error -- cgit v1.2.1