From 384adb20cf10db3ce1df33c2f133fcc098428cbd Mon Sep 17 00:00:00 2001 From: Martin Hunt Date: Tue, 18 Dec 2001 18:54:18 +0000 Subject: 2001-12-18 Martin M. Hunt * ser-tcp.c (tcp_open): Disable Nagle algorithm which improves performance in some cases. --- gdb/ser-tcp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/ser-tcp.c') diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 6a6517744be..6dc82846b6f 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -165,6 +165,11 @@ tcp_open (struct serial *scb, const char *name) tmp = 0; ioctl (scb->fd, FIONBIO, &tmp); + /* Disable Nagle algorithm. Needed in some cases. */ + tmp = 1; + setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY, + (char *)&tmp, sizeof (tmp)); + /* If we don't do this, then GDB simply exits when the remote side dies. */ signal (SIGPIPE, SIG_IGN); -- cgit v1.2.1