From d0d36795e807cf72295c6e73813e0c2daa0a71e7 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 23 Aug 2007 22:06:04 +0000 Subject: 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 --- src/inspircd.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/inspircd.cpp') 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); -- cgit v1.3.1-10-gc9f91