From e7887c1f013248274574ab8e3167f742ccb3d69b Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 26 Apr 2011 19:13:51 -0400 Subject: Unmodularized the socket engine because its causing problems and really is unnecessary --- include/extern.h | 1 - include/modules.h | 2 +- include/services.h | 3 --- include/socketengine.h | 26 +++++++++++++------------- include/sysconf.h.cmake | 3 ++- 5 files changed, 16 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/extern.h b/include/extern.h index 67bb72220..555292712 100644 --- a/include/extern.h +++ b/include/extern.h @@ -224,7 +224,6 @@ E void notice_server(const Anope::string &source, const Server *s, const char *f /**** sockets.cpp ****/ -E SocketEngineBase *SocketEngine; E int32 TotalRead; E int32 TotalWritten; E SocketIO normalSocketIO; diff --git a/include/modules.h b/include/modules.h index b03fca8b1..415808def 100644 --- a/include/modules.h +++ b/include/modules.h @@ -154,7 +154,7 @@ enum ModuleReturn */ enum Priority { PRIORITY_FIRST, PRIORITY_DONTCARE, PRIORITY_LAST, PRIORITY_BEFORE, PRIORITY_AFTER }; /* Module types, in the order in which they are unloaded. The order these are in is IMPORTANT */ -enum MODType { MT_BEGIN, THIRD, QATESTED, SUPPORTED, CORE, DATABASE, ENCRYPTION, PROTOCOL, SOCKETENGINE, MT_END }; +enum MODType { MT_BEGIN, THIRD, QATESTED, SUPPORTED, CORE, DATABASE, ENCRYPTION, PROTOCOL, MT_END }; typedef std::multimap message_map; extern CoreExport message_map MessageMap; diff --git a/include/services.h b/include/services.h index 57cf0972b..9bb49dba2 100644 --- a/include/services.h +++ b/include/services.h @@ -59,9 +59,6 @@ # include # include # include -# ifdef HAVE_BACKTRACE -# include -# endif # define DllExport # define CoreExport # define MARK_DEPRECATED __attribute((deprecated)) diff --git a/include/socketengine.h b/include/socketengine.h index 9ee94f399..05859eedb 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -12,47 +12,47 @@ #ifndef SOCKETENGINE_H #define SOCKETENGINE_H -class CoreExport SocketEngineBase +class CoreExport SocketEngine { - public: #ifdef _WIN32 /* Windows crap */ - WSADATA wsa; + static WSADATA wsa; #endif + public: /* Map of sockets */ - std::map Sockets; + static std::map Sockets; - /** Default constructor + /** Called to initialize the socket engine */ - SocketEngineBase(); + static void Init(); - /** Default destructor + /** Called to shutdown the socket engine */ - virtual ~SocketEngineBase(); + static void Shutdown(); /** Add a socket to the internal list * @param s The socket */ - virtual void AddSocket(Socket *s) { } + static void AddSocket(Socket *s); /** Delete a socket from the internal list * @param s The socket */ - virtual void DelSocket(Socket *s) { } + static void DelSocket(Socket *s); /** Mark a socket as writeable * @param s The socket */ - virtual void MarkWritable(Socket *s) { } + static void MarkWritable(Socket *s); /** Unmark a socket as writeable * @param s The socket */ - virtual void ClearWritable(Socket *s) { } + static void ClearWritable(Socket *s); /** Read from sockets and do things */ - virtual void Process() { } + static void Process(); }; #endif // SOCKETENGINE_H diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake index 68f3f74e6..ff391a7b1 100644 --- a/include/sysconf.h.cmake +++ b/include/sysconf.h.cmake @@ -7,13 +7,14 @@ #cmakedefine HAVE_SYS_TYPES_H 1 #cmakedefine HAVE_STDINT_H 1 #cmakedefine HAVE_STDDEF_H 1 -#cmakedefine HAVE_BACKTRACE 1 #cmakedefine HAVE_SETGRENT 1 #cmakedefine HAVE_STRCASECMP 1 #cmakedefine HAVE_STRICMP 1 #cmakedefine HAVE_STRINGS_H 1 #cmakedefine HAVE_UMASK 1 #cmakedefine HAVE_EVENTFD 1 +#cmakedefine HAVE_EPOLL 1 +#cmakedefine HAVE_POLL 1 #cmakedefine GETTEXT_FOUND 1 #cmakedefine RUNGROUP "@RUNGROUP@" -- cgit