summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-26 19:13:51 -0400
committerAdam <Adam@anope.org>2011-05-16 04:08:47 -0400
commite7887c1f013248274574ab8e3167f742ccb3d69b (patch)
treef9f5959512b7129711f03156320ae0e46cabaec3 /include
parent076ebafa1b4cc935c466c615b94eaac415af9a67 (diff)
Unmodularized the socket engine because its causing problems and really is unnecessary
Diffstat (limited to 'include')
-rw-r--r--include/extern.h1
-rw-r--r--include/modules.h2
-rw-r--r--include/services.h3
-rw-r--r--include/socketengine.h26
-rw-r--r--include/sysconf.h.cmake3
5 files changed, 16 insertions, 19 deletions
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<Anope::string, Message *> 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 <sys/socket.h>
# include <sys/time.h>
# include <dirent.h>
-# ifdef HAVE_BACKTRACE
-# include <execinfo.h>
-# 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<int, Socket *> Sockets;
+ static std::map<int, Socket *> 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@"