summaryrefslogtreecommitdiff
path: root/src/modules.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/modules.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/modules.cpp')
-rw-r--r--src/modules.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 51fecb47c..c11b63bec 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -159,11 +159,11 @@ void Module::OnGlobalOper(User*) { }
void Module::OnPostConnect(User*) { }
ModResult Module::OnAddBan(User*, Channel*, const std::string &) { return MOD_RES_PASSTHRU; }
ModResult Module::OnDelBan(User*, Channel*, const std::string &) { return MOD_RES_PASSTHRU; }
-void Module::OnRawSocketAccept(int, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { }
-int Module::OnRawSocketWrite(int, const char*, int) { return 0; }
-void Module::OnRawSocketClose(int) { }
-void Module::OnRawSocketConnect(int) { }
-int Module::OnRawSocketRead(int, char*, unsigned int, int&) { return 0; }
+void Module::OnStreamSocketAccept(StreamSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { }
+int Module::OnStreamSocketWrite(StreamSocket*, std::string&) { return -1; }
+void Module::OnStreamSocketClose(StreamSocket*) { }
+void Module::OnStreamSocketConnect(StreamSocket*) { }
+int Module::OnStreamSocketRead(StreamSocket*, std::string&) { return -1; }
void Module::OnUserMessage(User*, void*, int, const std::string&, char, const CUList&) { }
void Module::OnUserNotice(User*, void*, int, const std::string&, char, const CUList&) { }
void Module::OnRemoteKill(User*, User*, const std::string&, const std::string&) { }
@@ -196,7 +196,7 @@ void Module::OnText(User*, void*, int, const std::string&, char, CUList&) { }
void Module::OnRunTestSuite() { }
void Module::OnNamesListItem(User*, Membership*, std::string&, std::string&) { }
ModResult Module::OnNumeric(User*, unsigned int, const std::string&) { return MOD_RES_PASSTHRU; }
-void Module::OnHookIO(EventHandler*, ListenSocketBase*) { }
+void Module::OnHookIO(StreamSocket*, ListenSocketBase*) { }
ModResult Module::OnHostCycle(User*) { return MOD_RES_PASSTHRU; }
void Module::OnSendWhoLine(User*, User*, Channel*, std::string&) { }