]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/socket.h
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
[user/henk/code/inspircd.git] / include / socket.h
index 8fd2df0df62832884e8c27ed1935e783773be90e..f868daf923fabe55984b00ad4c965a7d7b74c9cc 100644 (file)
 #include <netinet/in.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <poll.h>
 #include <netdb.h>
 #include <errno.h>
 #include "inspircd_config.h"
+#include "socketengine.h"
 
 namespace irc
 {
@@ -138,4 +138,23 @@ namespace irc
        };
 };
 
+/** This class handles incoming connections on client ports.
+ * It will create a new userrec for every valid connection
+ * and assign it a file descriptor.
+ */
+class ListenSocket : public EventHandler
+{
+ protected:
+       /** The creator/owner of this object
+        */
+       InspIRCd* ServerInstance;
+ public:
+       /** Create a new listening socket
+        */
+       ListenSocket(InspIRCd* Instance, int sockfd, irc::sockets::insp_sockaddr client, irc::sockets::insp_sockaddr server, int port, char* addr);
+       /** Handle an I/O event
+        */
+       void HandleEvent(EventType et);
+};
+
 #endif