summaryrefslogtreecommitdiff
path: root/src/connection.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-12 11:12:14 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-12 11:12:14 +0000
commitafb129a6421a7b07a21d845c50065b3c1bb49510 (patch)
treeb085cbd3540516bd789fc3378beb93512be1220d /src/connection.cpp
parent2f289f057ddfd61b7c5c00f7e292b0a72f10c80c (diff)
Added 'K' token (remote kills)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@558 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 9ee559725..4867cc55b 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -70,10 +70,17 @@ bool connection::CreateListener(char* host, int p)
this->port = p;
- setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on));
- linger.l_onoff = 1;
- linger.l_linger = 0;
- setsockopt(fd,SOL_SOCKET,SO_LINGER,(const char*)&linger,sizeof(linger));
+ setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on));
+ linger.l_onoff = 1;
+ linger.l_linger = 0;
+ setsockopt(fd,SOL_SOCKET,SO_LINGER,(const char*)&linger,sizeof(linger));
+
+ // attempt to increase socket sendq and recvq as high as its possible
+ // to get them on linux.
+ int sendbuf = 32768;
+ int recvbuf = 32768;
+ setsockopt(fd,SOL_SOCKET,SO_SNDBUF,(const void *)&sendbuf,sizeof(sendbuf));
+ setsockopt(fd,SOL_SOCKET,SO_RCVBUF,(const void *)&recvbuf,sizeof(sendbuf));
return true;
}