summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-07-03 17:26:45 -0400
committerattilamolnar <attilamolnar@hush.com>2013-07-14 20:23:53 +0200
commit6e0b904d342461cd2ac2a3cd0cf2a43d864d2b00 (patch)
tree980eb8923398714aeef820d0bb6b719f3b149837 /include
parent2a9aa9be8ac4a97ce766c797aff76abf135bb139 (diff)
Use the correct socket related error messages on Windows
Diffstat (limited to 'include')
-rw-r--r--include/socketengine.h8
1 files changed, 8 insertions, 0 deletions
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()