X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fsocketengine.h;h=d97c0ea9f9b9bd6c139abd09575e459e6a9d5ebc;hb=2eed59bea6f6e42c77ffd7e6061570c13f172e21;hp=8e4c3dfc9e3dbf5dca98ae2a86b276b63c15502e;hpb=8790551dc182cd8804ee7d8ef89ccb31067cc2a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/socketengine.h b/include/socketengine.h index 8e4c3dfc9..d97c0ea9f 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -493,6 +493,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()