diff --git a/lib/socket.cpp b/lib/socket.cpp index dc554a11..00de1bd1 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -295,6 +295,11 @@ int Socket::Connection::getSocket() { return -1; } +/// Returns non-piped internal socket number. +int Socket::Connection::getPureSocket() { + return sock; +} + /// Returns a string describing the last error that occured. /// Only reports errors if an error actually occured - returns the host address or empty string otherwise. std::string Socket::Connection::getError() { diff --git a/lib/socket.h b/lib/socket.h index 5fbd5380..62de9d6a 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -75,6 +75,7 @@ namespace Socket { std::string getBinHost(); void setHost(std::string host); ///< Sets hostname for connection manually. int getSocket(); ///< Returns internal socket number. + int getPureSocket(); ///< Returns non-piped internal socket number. std::string getError(); ///< Returns a string describing the last error that occured. bool connected() const; ///< Returns the connected-state for this socket. bool isAddress(std::string addr);