diff options
author | rsc <devnull@localhost> | 2004-06-16 03:50:28 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-06-16 03:50:28 +0000 |
commit | bd2e802053c8fc6babf4c2bb6e33912f1c0aee9d (patch) | |
tree | 06fd7c42774a8f0a2f2fa3579a0958544c59ed76 /src/lib9 | |
parent | c5eb686096c8e5fef13230867ea7ce494b0376d7 (diff) | |
download | plan9port-bd2e802053c8fc6babf4c2bb6e33912f1c0aee9d.tar.gz plan9port-bd2e802053c8fc6babf4c2bb6e33912f1c0aee9d.tar.bz2 plan9port-bd2e802053c8fc6babf4c2bb6e33912f1c0aee9d.zip |
DAMN BERKELEY.
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/announce.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib9/announce.c b/src/lib9/announce.c index 8fdf1d40..f125b712 100644 --- a/src/lib9/announce.c +++ b/src/lib9/announce.c @@ -4,6 +4,7 @@ #include <sys/socket.h> #include <netinet/in.h> +#include <netinet/tcp.h> #include <sys/un.h> #include <errno.h> @@ -119,7 +120,7 @@ Success: int p9listen(char *dir, char *newdir) { - int fd; + int fd, one; if((fd = _p9netfd(dir)) < 0){ werrstr("bad 'directory' in listen: %s", dir); @@ -129,6 +130,9 @@ p9listen(char *dir, char *newdir) if((fd = accept(fd, nil, nil)) < 0) return -1; + one = 1; + setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&one, sizeof one); + putfd(newdir, fd); return fd; } |