Added getPureSocket call to socket library for detecting piped/real socket difference.
This commit is contained in:
parent
06f88ef296
commit
21c083ccc1
2 changed files with 6 additions and 0 deletions
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue