From 67a59bc02d4e7bd331e648efcf1d5a09fe048c56 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/ChangeLog | 5 +++++ gdb/ser-tcp.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 32a404d..e51664c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-12-18 Martin M. Hunt + + * ser-tcp.c (tcp_open): Disable Nagle algorithm which + improves performance in some cases. + 2001-12-17 Ben Harris * armbsd-nat.c: Remove file, renamed to armnbsd-nat.c. diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 6a65177..6dc8284 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.1