summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-05-21 04:57:27 -0400
committerAdam <Adam@anope.org>2011-05-21 04:57:27 -0400
commit115f94bfc23c481eab50298895f76bd494179cd8 (patch)
treeeeda28c466e9f2f532b2dee75cb817eba9066357 /src/misc.cpp
parent7e5727288d9b2da5b53476b91f8cb9fe96e14d53 (diff)
Made Anope able to process normally when disconnected from the uplink and not sleep(), enable usage of non-blocking connect() and default all sockets to non blocking mode. Some cleanup to m_ssl and some cleanup to main.cpp.
Diffstat (limited to 'src/misc.cpp')
-rw-r--r--src/misc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index fff224eed..966af359e 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -843,6 +843,15 @@ void Anope::Unhex(const Anope::string &src, char *dest)
dest[destpos] = 0;
}
+int Anope::LastErrorCode()
+{
+#ifndef _WIN32
+ return errno;
+#else
+ return GetLastError();
+#endif
+}
+
const Anope::string Anope::LastError()
{
#ifndef _WIN32