feat(Socket): expose lastError()

This commit is contained in:
Alex Fabijanic 2021-06-29 15:17:20 +02:00
parent 9f177f7e5a
commit ac0233b367
2 changed files with 9 additions and 0 deletions

View File

@ -354,6 +354,9 @@ public:
/// of buffers used for writing (ie. reading from socket /// of buffers used for writing (ie. reading from socket
/// into buffers). /// into buffers).
static int lastError();
/// Returns the last socket error.
protected: protected:
Socket(SocketImpl* pImpl); Socket(SocketImpl* pImpl);
/// Creates the Socket and attaches the given SocketImpl. /// Creates the Socket and attaches the given SocketImpl.

View File

@ -487,4 +487,10 @@ SocketBufVec Socket::makeBufVec(const std::vector<std::string>& vec)
} }
int Socket::lastError()
{
return SocketImpl::lastError();
}
} } // namespace Poco::Net } } // namespace Poco::Net