]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/inspsocket.h
Document ListenSocket class
[user/henk/code/inspircd.git] / include / inspsocket.h
index 42ce01a27d55bbb0223d9e943ed4280f2c4a16f6..3791aa3e02cfb6ea05d0a5db3d26cb0ee15f18b0 100644 (file)
@@ -23,6 +23,7 @@
 #include "dns.h"
 #include "inspircd_config.h"
 #include "socket.h"
+#include "inspsocket.h"
 
 /**
  * States which a socket may be in
@@ -37,6 +38,11 @@ enum InspSocketError { I_ERR_TIMEOUT, I_ERR_SOCKET, I_ERR_CONNECT, I_ERR_BIND, I
 class InspSocket;
 class InspIRCd;
 
+using irc::sockets::insp_sockaddr;
+using irc::sockets::insp_inaddr;
+using irc::sockets::insp_ntoa;
+using irc::sockets::insp_aton;
+
 /**
  * InspSocket is an extendable socket class which modules
  * can use for TCP socket support. It is fully integrated
@@ -48,18 +54,13 @@ class InspIRCd;
  * and use the InspSocket constructors to establish connections
  * and bindings.
  */
-class InspSocket : public Extensible
+class InspSocket : public EventHandler
 {
  public:
        InspIRCd* Instance;
 
        std::deque<std::string> outbuffer;
 
-       /**
-        * The file descriptor of this socket
-        */
-        int fd;
-
        /**
         * The hostname connected to
         */
@@ -360,6 +361,10 @@ class InspSocket : public Extensible
         * memory reclaimed.
         */
        void MarkAsClosed();
+
+       void HandleEvent(EventType et);
+
+       bool Readable();
 };
 
 #endif