DAMN BERKELEY.

This commit is contained in:
rsc 2004-06-16 03:50:28 +00:00
parent c5eb686096
commit bd2e802053

View file

@ -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;
}