summaryrefslogtreecommitdiff
path: root/include
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
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')
-rw-r--r--include/socketengine.h22
-rw-r--r--include/sockets.h1
2 files changed, 6 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
*/
diff --git a/include/sockets.h b/include/sockets.h
index ea59346db..7074522e0 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -110,6 +110,7 @@ class SocketException : public CoreException
enum SocketFlag
{
SF_DEAD,
+ SF_READABLE,
SF_WRITABLE,
SF_CONNECTING,
SF_CONNECTED,