summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h4
-rw-r--r--include/socket.h18
2 files changed, 12 insertions, 10 deletions
diff --git a/include/configreader.h b/include/configreader.h
index af9c33533..029b8ac99 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -603,9 +603,9 @@ class CoreExport ServerConfig : public Extensible
*/
ClassVector Classes;
- /** A list of the classes for listening client ports
+ /** A list of the classes for listening ports
*/
- std::vector<ListenSocket*> ports;
+ std::vector<ListenSocketBase *> ports;
/** The 005 tokens of this server (ISUPPORT)
* populated/repopulated upon loading or unloading
diff --git a/include/socket.h b/include/socket.h
index 1f699dbd7..961fbd98e 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -145,7 +145,7 @@ namespace irc
* It will create a new User for every valid connection
* and assign it a file descriptor.
*/
-class CoreExport ListenSocket : public EventHandler
+class CoreExport ListenSocketBase : public EventHandler
{
protected:
/** The creator/owner of this object
@@ -171,13 +171,13 @@ class CoreExport ListenSocket : public EventHandler
public:
/** Create a new listening socket
*/
- ListenSocket(InspIRCd* Instance, int port, char* addr);
+ ListenSocketBase(InspIRCd* Instance, int port, char* addr);
/** Handle an I/O event
*/
void HandleEvent(EventType et, int errornum = 0);
/** Close the socket
*/
- ~ListenSocket();
+ ~ListenSocketBase();
/** Set descriptive text
*/
void SetDescription(const std::string &description)
@@ -212,13 +212,15 @@ class CoreExport ListenSocket : public EventHandler
* @param fd The file descriptor of the new connection
* @param incomingip The IP from which the connection was made
*/
- virtual void OnAcceptReady(const std::string &ipconnectedto, int fd, const std::string &incomingip);
+ virtual void OnAcceptReady(const std::string &ipconnectedto, int fd, const std::string &incomingip) = 0;
};
-//class CoreExport ListenSocketClient : public ListenSocket
-//{
-//
-//}
+class CoreExport ClientListenSocket : public ListenSocketBase
+{
+ virtual void OnAcceptReady(const std::string &ipconnectedto, int fd, const std::string &incomingip);
+ public:
+ ClientListenSocket(InspIRCd* Instance, int port, char* addr) : ListenSocketBase(Instance, port, addr) { }
+};
#endif