summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-21 13:26:31 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-21 13:26:31 +0000
commite2af2347fc035d702e45f12e772223a8d578410d (patch)
treebfd80aac2858a9f4faedc316794fc1051dbaa72c /src/inspircd.cpp
parent16fc672b685752007e47aed0fb97bc1ee7443c76 (diff)
Create StreamSocket for IO hooking implementation
Fixes the SSL SendQ bug Removes duplicate code between User and BufferedSocket Simplify SSL module API Simplify EventHandler API (Readable/Writeable moved to SE) Add hook for culled objects to invoke callbacks prior to destructor Replace SocketCull with GlobalCull now that sockets can close themselves Shorten common case of user read/parse/write path: User::Write is now zero-copy up to syscall/SSL invocation User::Read has only two copy/scan passes from read() to ProcessCommand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11752 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 1b23bff02..704fec475 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -110,7 +110,6 @@ void InspIRCd::Cleanup()
{
User* u = *i++;
Users->QuitUser(u, "Server shutdown");
- u->CloseSocket();
}
/* We do this more than once, so that any service providers get a
@@ -323,7 +322,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
* THIS MUST MATCH ORDER OF DECLARATION OF THE HandleWhateverFunc classes
* within class InspIRCd.
*/
- HandleProcessUser(this),
HandleIsNick(this),
HandleIsIdent(this),
HandleFloodQuitUser(this),
@@ -336,7 +334,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
* THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods
* themselves within the class.
*/
- ProcessUser(&HandleProcessUser),
IsChannel(&HandleIsChannel),
IsSID(&HandleIsSID),
Rehash(&HandleRehash),
@@ -387,9 +384,8 @@ InspIRCd::InspIRCd(int argc, char** argv) :
// This must be created first, so other parts of Insp can use it while starting up
this->Logs = new LogManager(this);
- SocketEngineFactory* SEF = new SocketEngineFactory();
- SE = SEF->Create(this);
- delete SEF;
+ SocketEngineFactory SEF;
+ SE = SEF.Create();
this->Threads = new ThreadEngine(this);
@@ -832,9 +828,6 @@ int InspIRCd::Run()
/* if any users were quit, take them out */
this->GlobalCulls.Apply();
- /* If any inspsockets closed, remove them */
- this->BufferedSocketCull();
-
if (this->s_signal)
{
this->SignalHandler(s_signal);
@@ -845,18 +838,6 @@ int InspIRCd::Run()
return 0;
}
-void InspIRCd::BufferedSocketCull()
-{
- for (std::map<BufferedSocket*,BufferedSocket*>::iterator x = SocketCull.begin(); x != SocketCull.end(); ++x)
- {
- this->Logs->Log("MISC",DEBUG,"Cull socket");
- SE->DelFd(x->second);
- x->second->Close();
- delete x->second;
- }
- SocketCull.clear();
-}
-
/**********************************************************************************/
/**