diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-15 21:04:32 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-15 21:04:32 +0000 |
commit | 2b68243097f98ace4a53b21520718874b0ed7db5 (patch) | |
tree | 5fbdbb4270efebbfb0956733d25b1245c8586d25 /src/modules/extra | |
parent | 03e0fb206d3f5709868f03bc7a401cb666c38ffb (diff) |
InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ident etc will use.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8206 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 10 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 8 | ||||
-rw-r--r-- | src/modules/extra/m_ziplink.cpp | 10 |
6 files changed, 23 insertions, 23 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 53d852f72..21906196b 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -624,7 +624,7 @@ void* DispatcherThread(void* arg); /** Used by m_mysql to notify one thread when the other has a result */ -class Notifier : public InspSocket +class Notifier : public BufferedSocket { insp_sockaddr sock_us; socklen_t uslen; @@ -634,9 +634,9 @@ class Notifier : public InspSocket /* Create a socket on a random port. Let the tcp stack allocate us an available port */ #ifdef IPV6 - Notifier(InspIRCd* SI) : InspSocket(SI, "::1", 0, true, 3000) + Notifier(InspIRCd* SI) : BufferedSocket(SI, "::1", 0, true, 3000) #else - Notifier(InspIRCd* SI) : InspSocket(SI, "127.0.0.1", 0, true, 3000) + Notifier(InspIRCd* SI) : BufferedSocket(SI, "127.0.0.1", 0, true, 3000) #endif { uslen = sizeof(sock_us); @@ -646,7 +646,7 @@ class Notifier : public InspSocket } } - Notifier(InspIRCd* SI, int newfd, char* ip) : InspSocket(SI, newfd, ip) + Notifier(InspIRCd* SI, int newfd, char* ip) : BufferedSocket(SI, newfd, ip) { } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 97ecd0a8a..3120836c9 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -29,7 +29,7 @@ /* SQLConn rewritten by peavey to * use EventHandler instead of - * InspSocket. This is much neater + * BufferedSocket. This is much neater * and gives total control of destroy * and delete of resources. */ diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 9795e9f8b..0f0da20a1 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -36,7 +36,7 @@ typedef std::deque<SQLite3Result*> ResultQueue; ResultNotifier* resultnotify = NULL; -class ResultNotifier : public InspSocket +class ResultNotifier : public BufferedSocket { Module* mod; insp_sockaddr sock_us; @@ -45,9 +45,9 @@ class ResultNotifier : public InspSocket public: /* Create a socket on a random port. Let the tcp stack allocate us an available port */ #ifdef IPV6 - ResultNotifier(InspIRCd* SI, Module* m) : InspSocket(SI, "::1", 0, true, 3000), mod(m) + ResultNotifier(InspIRCd* SI, Module* m) : BufferedSocket(SI, "::1", 0, true, 3000), mod(m) #else - ResultNotifier(InspIRCd* SI, Module* m) : InspSocket(SI, "127.0.0.1", 0, true, 3000), mod(m) + ResultNotifier(InspIRCd* SI, Module* m) : BufferedSocket(SI, "127.0.0.1", 0, true, 3000), mod(m) #endif { uslen = sizeof(sock_us); @@ -57,7 +57,7 @@ class ResultNotifier : public InspSocket } } - ResultNotifier(InspIRCd* SI, Module* m, int newfd, char* ip) : InspSocket(SI, newfd, ip), mod(m) + ResultNotifier(InspIRCd* SI, Module* m, int newfd, char* ip) : BufferedSocket(SI, newfd, ip), mod(m) { } diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index a7a52d910..323fe912f 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -90,7 +90,7 @@ class ModuleSSLGnuTLS : public Module ModuleSSLGnuTLS(InspIRCd* Me) : Module(Me) { - ServerInstance->Modules->PublishInterface("InspSocketHook", this); + ServerInstance->Modules->PublishInterface("BufferedSocketHook", this); // Not rehashable...because I cba to reduce all the sizes of existing buffers. inbufsize = ServerInstance->Config->NetBufferSize; @@ -307,7 +307,7 @@ class ModuleSSLGnuTLS : public Module char* ret = "OK"; try { - ret = ServerInstance->Config->AddIOHook((Module*)this, (InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + ret = ServerInstance->Config->AddIOHook((Module*)this, (BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } catch (ModuleException &e) { @@ -317,7 +317,7 @@ class ModuleSSLGnuTLS : public Module } else if (strcmp("IS_UNHOOK", request->GetId()) == 0) { - return ServerInstance->Config->DelIOHook((InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + return ServerInstance->Config->DelIOHook((BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { @@ -336,7 +336,7 @@ class ModuleSSLGnuTLS : public Module { if ((Extensible*)ServerInstance->FindDescriptor(ISR->Sock->GetFd()) == (Extensible*)(ISR->Sock)) { - VerifyCertificate(session, (InspSocket*)ISR->Sock); + VerifyCertificate(session, (BufferedSocket*)ISR->Sock); return "OK"; } } @@ -572,7 +572,7 @@ class ModuleSSLGnuTLS : public Module MakePollWrite(session); /* Who's smart idea was it to return 1 when we havent written anything? - * This fucks the buffer up in InspSocket :p + * This fucks the buffer up in BufferedSocket :p */ return ret < 1 ? 0 : ret; } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 4ce21c805..df47762af 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -130,7 +130,7 @@ class ModuleSSLOpenSSL : public Module ModuleSSLOpenSSL(InspIRCd* Me) : Module(Me), PublicInstance(Me) { - ServerInstance->Modules->PublishInterface("InspSocketHook", this); + ServerInstance->Modules->PublishInterface("BufferedSocketHook", this); // Not rehashable...because I cba to reduce all the sizes of existing buffers. inbufsize = ServerInstance->Config->NetBufferSize; @@ -356,7 +356,7 @@ class ModuleSSLOpenSSL : public Module char* ret = "OK"; try { - ret = ServerInstance->Config->AddIOHook((Module*)this, (InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + ret = ServerInstance->Config->AddIOHook((Module*)this, (BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } catch (ModuleException &e) { @@ -367,7 +367,7 @@ class ModuleSSLOpenSSL : public Module } else if (strcmp("IS_UNHOOK", request->GetId()) == 0) { - return ServerInstance->Config->DelIOHook((InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + return ServerInstance->Config->DelIOHook((BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { @@ -382,7 +382,7 @@ class ModuleSSLOpenSSL : public Module issl_session* session = &sessions[ISR->Sock->GetFd()]; if (session->sess) { - VerifyCertificate(session, (InspSocket*)ISR->Sock); + VerifyCertificate(session, (BufferedSocket*)ISR->Sock); return "OK"; } } diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index 90da97856..c7ba1b6af 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -150,7 +150,7 @@ class ModuleZLib : public Module ModuleZLib(InspIRCd* Me) : Module::Module(Me) { - ServerInstance->Modules->PublishInterface("InspSocketHook", this); + ServerInstance->Modules->PublishInterface("BufferedSocketHook", this); total_out_compressed = total_in_compressed = 0; total_out_uncompressed = total_out_uncompressed = 0; @@ -158,7 +158,7 @@ class ModuleZLib : public Module virtual ~ModuleZLib() { - ServerInstance->Modules->UnpublishInterface("InspSocketHook", this); + ServerInstance->Modules->UnpublishInterface("BufferedSocketHook", this); } virtual Version GetVersion() @@ -172,7 +172,7 @@ class ModuleZLib : public Module List[I_OnStats] = List[I_OnRequest] = 1; } - /* Handle InspSocketHook API requests */ + /* Handle BufferedSocketHook API requests */ virtual char* OnRequest(Request* request) { ISHRequest* ISR = (ISHRequest*)request; @@ -187,7 +187,7 @@ class ModuleZLib : public Module char* ret = "OK"; try { - ret = ServerInstance->Config->AddIOHook((Module*)this, (InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + ret = ServerInstance->Config->AddIOHook((Module*)this, (BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } catch (ModuleException& e) { @@ -198,7 +198,7 @@ class ModuleZLib : public Module else if (strcmp("IS_UNHOOK", request->GetId()) == 0) { /* Detatch from an inspsocket */ - return ServerInstance->Config->DelIOHook((InspSocket*)ISR->Sock) ? (char*)"OK" : NULL; + return ServerInstance->Config->DelIOHook((BufferedSocket*)ISR->Sock) ? (char*)"OK" : NULL; } else if (strcmp("IS_HSDONE", request->GetId()) == 0) { |