diff options
author | Adam <Adam@anope.org> | 2010-07-08 22:19:13 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-07-08 22:19:13 -0400 |
commit | 1cf4ebb231f2f7770b717a5e176d7bb5cbc66284 (patch) | |
tree | 16094a36484e2764c5f541c4324e1d2a6300f61b /src/modules/ssl/m_ssl.cpp | |
parent | 8f8b1e46d670f45bafdc5c888bec3f005cc06c1f (diff) |
Added an epoll socket engine
Diffstat (limited to 'src/modules/ssl/m_ssl.cpp')
-rw-r--r-- | src/modules/ssl/m_ssl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/ssl/m_ssl.cpp b/src/modules/ssl/m_ssl.cpp index 5bc9870da..0771e6d4c 100644 --- a/src/modules/ssl/m_ssl.cpp +++ b/src/modules/ssl/m_ssl.cpp @@ -14,22 +14,22 @@ static SSL_CTX *ctx; -class SSLSocket : public Socket +class SSLSocket : public ClientSocket { private: SSL *sslsock; - int RecvInternal(char *buf, size_t sz) const + const int RecvInternal(char *buf, size_t sz) const { return SSL_read(sslsock, buf, sz); } - int SendInternal(const std::string &buf) const + const int SendInternal(const std::string &buf) const { return SSL_write(sslsock, buf.c_str(), buf.size()); } public: - SSLSocket(const std::string &nTargetHost, int nPort, const std::string &nBindHost = "", bool nIPv6 = false) : Socket(nTargetHost, nPort, nBindHost, nIPv6) + SSLSocket(const std::string &nTargetHost, int nPort, const std::string &nBindHost = "", bool nIPv6 = false) : ClientSocket(nTargetHost, nPort, nBindHost, nIPv6) { sslsock = SSL_new(ctx); @@ -37,7 +37,7 @@ class SSLSocket : public Socket throw CoreException("Unable to initialize SSL socket"); SSL_set_connect_state(sslsock); - SSL_set_fd(sslsock, Sock); + SSL_set_fd(sslsock, sock); SSL_connect(sslsock); UplinkSock = this; |