summaryrefslogtreecommitdiff
path: root/include/socket.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:32 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-02 00:48:32 +0000
commit06e0d5c7f0f78c489090fe5f0c18a91e8cb41ae8 (patch)
treeb05cf1bb463a9fd986768357c717709049f0caa6 /include/socket.h
parentc4cb1f9477b1fbf8662bedb1c36f84ff6f87e1f3 (diff)
Use a set to mark client SSL ports rather than going by textual IP/port pairs
This theoretically speeds up accepting connections. Visible changes are proper IPv6 port text in 005 output and no possibility of incorrect SSL on addresses that mismatch an incoming port (possible with IPv4 wildcard SSL and IPv6 plaintext on the same port, not that anyone would do such a thing). Bind ports also now tell which SSL module they use in /stats p. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11629 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socket.h')
-rw-r--r--include/socket.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/socket.h b/include/socket.h
index d3a45475d..f97630d04 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -139,10 +139,12 @@ class CoreExport ListenSocketBase : public EventHandler
/** Socket description (shown in stats p) */
std::string desc;
- /** Address socket is bound to */
+ /** Raw address socket is bound to */
std::string bind_addr;
/** Port socket is bound to */
int bind_port;
+ /** Human-readable address/port socket is bound to */
+ std::string bind_desc;
/** The client address if the most recently connected client.
* Should only be used when accepting a new client.
@@ -173,18 +175,17 @@ class CoreExport ListenSocketBase : public EventHandler
}
/** Get description for socket
*/
- const std::string& GetDescription()
- {
- return desc;
- }
+ const std::string& GetDescription() { return desc; }
/** Get port number for socket
*/
- int GetPort() { return bind_port; }
+ const int GetPort() { return bind_port; }
/** Get IP address socket is bound to
*/
const std::string &GetIP() { return bind_addr; }
+ const std::string &GetBindDesc() { return bind_desc; }
+
/** Handles sockets internals crap of a connection, convenience wrapper really
*/
void AcceptInternal();