summaryrefslogtreecommitdiff
path: root/gdb/ser-tcp.c
diff options
context:
space:
mode:
authorMartin Hunt <hunt@redhat.com>2001-12-18 18:54:18 +0000
committerMartin Hunt <hunt@redhat.com>2001-12-18 18:54:18 +0000
commit384adb20cf10db3ce1df33c2f133fcc098428cbd (patch)
treedcfeef39e46308b5e2ed7ceed60eb432d571da02 /gdb/ser-tcp.c
parentee6156b04bbcb08dc83f6e3612de2fb2ccb1870f (diff)
downloadgdb-384adb20cf10db3ce1df33c2f133fcc098428cbd.tar.gz
2001-12-18 Martin M. Hunt <hunt@redhat.com>
* ser-tcp.c (tcp_open): Disable Nagle algorithm which improves performance in some cases.
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r--gdb/ser-tcp.c5
1 files changed, 5 insertions, 0 deletions
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);