From 6e0b904d342461cd2ac2a3cd0cf2a43d864d2b00 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 3 Jul 2013 17:26:45 -0400 Subject: Use the correct socket related error messages on Windows --- include/socketengine.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/socketengine.h') diff --git a/include/socketengine.h b/include/socketengine.h index 2fc3cdbfd..37b7d6373 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -494,6 +494,14 @@ public: * Checks EAGAIN and WSAEWOULDBLOCK */ static bool IgnoreError(); + + /** Return the last socket related error. strrerror(errno) on *nix + */ + static std::string LastError(); + + /** Returns the error for the given error num, strerror(errnum) on *nix + */ + static std::string GetError(int errnum); }; inline bool SocketEngine::IgnoreError() -- cgit v1.2.3