summaryrefslogtreecommitdiff
path: root/src/connection.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-09 13:22:36 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-05-09 13:22:36 +0000
commitd9a197a6f5632b80c81a5ff7bf1537e1ef892b6b (patch)
treecad48e0fd38e04db2fae62eb5041a567bef7e755 /src/connection.cpp
parent3fdab8ea4af40635c0f950be4c9edbc56f1a9053 (diff)
Removed some very old crap
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@801 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/connection.cpp')
-rw-r--r--src/connection.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index 61c3c5bfe..bb3e8f75b 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -42,6 +42,18 @@ bool connection::CreateListener(char* host, int p)
return false;
}
+ 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));
+
memset((void*)&host_address, 0, sizeof(host_address));
host_address.sin_family = AF_INET;
@@ -69,18 +81,6 @@ 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));
-
- // 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));
-
listen(this->fd,5);
return true;