2001-12-18 Martin M. Hunt <hunt@redhat.com>
authorMartin Hunt <hunt@redhat.com>
Tue, 18 Dec 2001 18:54:18 +0000 (18:54 +0000)
committerMartin Hunt <hunt@redhat.com>
Tue, 18 Dec 2001 18:54:18 +0000 (18:54 +0000)
* ser-tcp.c (tcp_open): Disable Nagle algorithm which
improves performance in some cases.

gdb/ChangeLog
gdb/ser-tcp.c

index 32a404d..e51664c 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-18  Martin M. Hunt  <hunt@redhat.com>
+
+       * ser-tcp.c (tcp_open): Disable Nagle algorithm which
+       improves performance in some cases.
+
 2001-12-17  Ben Harris  <bjh21@netbsd.org>
 
        * armbsd-nat.c: Remove file, renamed to armnbsd-nat.c.
index 6a65177..6dc8284 100644 (file)
@@ -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);