]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
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 32a404d40fe56fb5b6290bcfad81a76c913238ce..e51664cdda8c1a985aec337472cca94d222256d6 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 6a6517744be2ad1b09cdf260c88430aeed93a569..6dc82846b6fe223b433b9a0596f3a63be4b7db0e 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);