diff --git a/Net/include/Poco/Net/Socket.h b/Net/include/Poco/Net/Socket.h index bc408609d..3f7109c8a 100644 --- a/Net/include/Poco/Net/Socket.h +++ b/Net/include/Poco/Net/Socket.h @@ -355,7 +355,10 @@ public: /// into buffers). static int lastError(); - /// Returns the last socket error. + /// Returns the last error code. + + static void error(); + /// Throws an appropriate exception for the last error. protected: Socket(SocketImpl* pImpl); diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 0bd5610f3..0ab76d29e 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -493,4 +493,10 @@ int Socket::lastError() } +void Socket::error() +{ + SocketImpl::error(); +} + + } } // namespace Poco::Net