]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_httpd.cpp
This one too, grr
[user/henk/code/inspircd.git] / src / modules / m_httpd.cpp
index a06098a0ea8d2ed1f82e4683da9da247f8b3979c..bb6c6d7865d716368cc7f6819731f0d2a1bddc60 100644 (file)
@@ -12,8 +12,6 @@
  */
 
 #include "inspircd.h"
-#include <algorithm>
-#include "modules.h"
 #include "httpd.h"
 
 /* $ModDesc: Provides HTTP serving facilities to modules */
@@ -38,7 +36,7 @@ class HttpServerSocket;
 
 /** This class is used to handle HTTP socket timeouts
  */
-class HttpServerTimeout : public InspTimer
+class HttpServerTimeout : public Timer
 {
  private:
        /** HttpServerSocket we are attached to
@@ -58,7 +56,7 @@ class HttpServerTimeout : public InspTimer
 
 /** A socket used for HTTP transport
  */
-class HttpServerSocket : public InspSocket
+class HttpServerSocket : public BufferedSocket
 {
        FileReader* index;
        HttpState InternalState;
@@ -78,13 +76,13 @@ class HttpServerSocket : public InspSocket
        
  public:
 
-       HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : InspSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0)
+       HttpServerSocket(InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, FileReader* index_page) : BufferedSocket(SI, host, port, listening, maxtime), index(index_page), postsize(0)
        {
                InternalState = HTTP_LISTEN;
                Timeout = NULL;
        }
 
-       HttpServerSocket(InspIRCd* SI, int newfd, char* ip, FileReader* ind) : InspSocket(SI, newfd, ip), index(ind), postsize(0), keepalive(false), DataSinceLastTick(false)
+       HttpServerSocket(InspIRCd* SI, int newfd, char* ip, FileReader* ind) : BufferedSocket(SI, newfd, ip), index(ind), postsize(0), keepalive(false), DataSinceLastTick(false)
        {
                InternalState = HTTP_SERVE_WAIT_REQUEST;
                Timeout = new HttpServerTimeout(this, Instance->SE);
@@ -424,7 +422,7 @@ class HttpServerSocket : public InspSocket
        }
 };
 
-HttpServerTimeout::HttpServerTimeout(HttpServerSocket* sock, SocketEngine* engine) : InspTimer(15, time(NULL), true), s(sock), SE(engine)
+HttpServerTimeout::HttpServerTimeout(HttpServerSocket* sock, SocketEngine* engine) : Timer(15, time(NULL), true), s(sock), SE(engine)
 {
 }
 
@@ -500,7 +498,7 @@ class ModuleHttpServer : public Module
                        httpsocks[i]->Close();
                        delete httpsocks[i]->GetIndex();
                }
-               ServerInstance->InspSocketCull();
+               ServerInstance->BufferedSocketCull();
        }
 
        virtual Version GetVersion()