2001-12-18 Martin M. Hunt <hunt@redhat.com>

* ser-tcp.c (tcp_open): Disable Nagle algorithm which
	improves performance in some cases.
This commit is contained in:
Martin Hunt 2001-12-18 18:54:18 +00:00
parent f0b79d91cb
commit 67a59bc02d
2 changed files with 10 additions and 0 deletions

View 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.

View 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);