diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/socket.h | 13 |
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(); |