X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fsocket.h;h=f868daf923fabe55984b00ad4c965a7d7b74c9cc;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=8fd2df0df62832884e8c27ed1935e783773be90e;hpb=8ef6da00a7b4aa32adbf7e19161bc6b8b59b7f7a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/socket.h b/include/socket.h index 8fd2df0df..f868daf92 100644 --- a/include/socket.h +++ b/include/socket.h @@ -26,10 +26,10 @@ #include #include #include -#include #include #include #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