aboutsummaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-08-23 22:06:04 +0000
committerGravatar brain2007-08-23 22:06:04 +0000
commitd0d36795e807cf72295c6e73813e0c2daa0a71e7 (patch)
tree09ae4d94ed7b6f3038d2579037fd2c7ee93a6657 /src/inspircd.cpp
parentTidyup some duplicated code (diff)
Craquity craq De-craq!
This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index f4a9b7e32..5c1835b03 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -41,8 +41,6 @@
#include "exitcodes.h"
#include "caller.h"
-using irc::sockets::NonBlocking;
-using irc::sockets::Blocking;
using irc::sockets::insp_ntoa;
using irc::sockets::insp_inaddr;
using irc::sockets::insp_sockaddr;
@@ -309,6 +307,10 @@ InspIRCd::InspIRCd(int argc, char** argv)
memset(&server, 0, sizeof(server));
memset(&client, 0, sizeof(client));
+ SocketEngineFactory* SEF = new SocketEngineFactory();
+ SE = SEF->Create(this);
+ delete SEF;
+
this->s_signal = 0;
this->unregistered_count = 0;
@@ -454,13 +456,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
}
}
-
- /* Because of limitations in kqueue on freebsd, we must fork BEFORE we
- * initialize the socket engine.
- */
- SocketEngineFactory* SEF = new SocketEngineFactory();
- SE = SEF->Create(this);
- delete SEF;
+ SE->RecoverFromFork();
this->Modes = new ModeParser(this);
this->AddServerName(Config->ServerName);