+/** 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 CoreExport ListenSocket : public EventHandler
+{
+ protected:
+ /** The creator/owner of this object
+ */
+ InspIRCd* ServerInstance;
+ std::string desc;
+ int family;
+ std::string bind_addr;
+ int bind_port;
+ public:
+ /** Create a new listening socket
+ */
+ ListenSocket(InspIRCd* Instance, int port, char* addr);
+ /** Handle an I/O event
+ */
+ void HandleEvent(EventType et, int errornum = 0);
+ /** Close the socket
+ */
+ ~ListenSocket();
+ /** Set descriptive text
+ */
+ void SetDescription(const std::string &description)
+ {
+ desc = description;
+ }
+
+ const std::string& GetDescription()
+ {
+ return desc;
+ }
+
+ int GetPort()
+ {
+ return bind_port;
+ }
+
+ std::string &GetIP()
+ {
+ return bind_addr;
+ }
+};
+