diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:38:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-11 18:38:00 +0000 |
commit | bfcaef8623bb3f8faf1141eb7b3805ab75ae97dd (patch) | |
tree | f26d108a63a8d311c64b400e58d5d1b7eff39bec /include/socket.h | |
parent | b469531385d6d65b2f9dface80fe1ab4b9e19e15 (diff) |
Refactor port binding, warning not yet tested fully
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6982 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socket.h')
-rw-r--r-- | include/socket.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/socket.h b/include/socket.h index 4e7d89192..88478f2e3 100644 --- a/include/socket.h +++ b/include/socket.h @@ -152,10 +152,12 @@ class ListenSocket : public EventHandler InspIRCd* ServerInstance; std::string desc; int family; + std::string bind_addr; + int bind_port; 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); + ListenSocket(InspIRCd* Instance, int port, char* addr); /** Handle an I/O event */ void HandleEvent(EventType et, int errornum = 0); @@ -173,6 +175,16 @@ class ListenSocket : public EventHandler { return desc; } + + int GetPort() + { + return bind_port; + } + + std::string &GetIP() + { + return bind_addr; + } }; #endif |