summaryrefslogtreecommitdiff
path: root/include/socketengine.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-01 13:32:38 -0400
committerAdam <Adam@anope.org>2012-11-01 14:47:23 -0400
commit90930619bc124e94bac5048c0b13c3f4748b559d (patch)
treecbe2325f6295aa188a6dd0f0d56d336eab060bbe /include/socketengine.h
parent5b1c8230191fa626ef9210c5035f14a8df4c0ed6 (diff)
Fixed quite a bit of dumbness with m_ssl. Had to
modify socketengines to allow polling for write & no read, but is it cleaner now. Made m_httpd able to listen using SSL.
Diffstat (limited to 'include/socketengine.h')
-rw-r--r--include/socketengine.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index 0cffec6b3..6cf49baa0 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -16,6 +16,7 @@
class CoreExport SocketEngine
{
+ static const int DefaultSize = 4; // Uplink, DNS, Signal handler, Mode stacker
public:
/* Map of sockets */
static std::map<int, Socket *> Sockets;
@@ -28,25 +29,12 @@ class CoreExport SocketEngine
*/
static void Shutdown();
- /** Add a socket to the internal list
+ /** Set a flag on a socket
* @param s The socket
+ * @param set Whether setting or unsetting
+ * @param flag The flag to set or unset
*/
- static void AddSocket(Socket *s);
-
- /** Delete a socket from the internal list
- * @param s The socket
- */
- static void DelSocket(Socket *s);
-
- /** Mark a socket as writeable
- * @param s The socket
- */
- static void MarkWritable(Socket *s);
-
- /** Unmark a socket as writeable
- * @param s The socket
- */
- static void ClearWritable(Socket *s);
+ static void Change(Socket *s, bool set, SocketFlag flag);
/** Read from sockets and do things
*/