Public Member Functions | Data Fields

SSLSocketIO Class Reference

Inherits SocketIO.

Collaboration diagram for SSLSocketIO:
Collaboration graph
[legend]

Public Member Functions

 SSLSocketIO ()
int Recv (Socket *s, char *buf, size_t sz) anope_override
int Send (Socket *s, const char *buf, size_t sz) anope_override
ClientSocketAccept (ListenSocket *s) anope_override
SocketFlag FinishAccept (ClientSocket *cs) anope_override
void Connect (ConnectionSocket *s, const Anope::string &target, int port) anope_override
SocketFlag FinishConnect (ConnectionSocket *s) anope_override
void Destroy () anope_override

Data Fields

SSL * sslsock

Detailed Description

Definition at line 26 of file m_ssl.cpp.


Constructor & Destructor Documentation

SSLSocketIO::SSLSocketIO (  ) 

Constructor

Definition at line 210 of file m_ssl.cpp.

References sslsock.


Member Function Documentation

ClientSocket * SSLSocketIO::Accept ( ListenSocket s  )  [virtual]

Accept a connection from a socket

Parameters:
s The socket
Returns:
The new socket

Reimplemented from SocketIO.

Definition at line 229 of file m_ssl.cpp.

References accept, anope_dynamic_static_cast(), FinishAccept(), Socket::flags, Socket::GetFD(), Socket::io, Anope::LastError(), me, NormalSocketIO, ListenSocket::OnAccept(), sockaddrs::sa, server_ctx, and sslsock.

void SSLSocketIO::Connect ( ConnectionSocket s,
const Anope::string target,
int  port 
) [virtual]

Connect the socket

Parameters:
s THe socket
target IP to connect to
port to connect to

Reimplemented from SocketIO.

Definition at line 305 of file m_ssl.cpp.

References SocketEngine::Change(), ConnectionSocket::conaddr, FinishConnect(), Socket::flags, Socket::GetFD(), Socket::io, Socket::IsIPv6(), Anope::LastError(), Anope::LastErrorCode(), NormalSocketIO, ConnectionSocket::OnError(), sockaddrs::pton(), sockaddrs::sa, SF_WRITABLE, and sockaddrs::size().

void SSLSocketIO::Destroy (  )  [virtual]

Called when the socket is destructing

Reimplemented from SocketIO.

Definition at line 386 of file m_ssl.cpp.

References sslsock.

SocketFlag SSLSocketIO::FinishAccept ( ClientSocket cs  )  [virtual]

Finished accepting a connection from a socket

Parameters:
s The socket
Returns:
SF_ACCEPTED if accepted, SF_ACCEPTING if still in process, SF_DEAD on error

Reimplemented from SocketIO.

Definition at line 265 of file m_ssl.cpp.

References anope_dynamic_static_cast(), SocketEngine::Change(), Socket::flags, Socket::io, NormalSocketIO, ClientSocket::OnAccept(), ClientSocket::OnError(), SF_ACCEPTED, SF_ACCEPTING, SF_READABLE, SF_WRITABLE, and sslsock.

Referenced by Accept().

SocketFlag SSLSocketIO::FinishConnect ( ConnectionSocket s  )  [virtual]

Called to potentially finish a pending connection

Parameters:
s The socket
Returns:
SF_CONNECTED on success, SF_CONNECTING if still pending, and SF_DEAD on error.

Reimplemented from SocketIO.

Definition at line 336 of file m_ssl.cpp.

References anope_dynamic_static_cast(), SocketEngine::Change(), client_ctx, Socket::flags, Socket::GetFD(), Socket::io, NormalSocketIO, ConnectionSocket::OnConnect(), ConnectionSocket::OnError(), SF_CONNECTED, SF_CONNECTING, SF_READABLE, SF_WRITABLE, and sslsock.

Referenced by Connect().

int SSLSocketIO::Recv ( Socket s,
char *  buf,
size_t  sz 
) [virtual]

Really receive something from the buffer

Parameters:
s The socket
buf The buf to read to
sz How much to read
Returns:
Number of bytes received

Reimplemented from SocketIO.

Definition at line 215 of file m_ssl.cpp.

References sslsock, and TotalRead.

int SSLSocketIO::Send ( Socket s,
const char *  buf,
size_t  sz 
) [virtual]

Write something to the socket

Parameters:
s The socket
buf The data to write
size The length of the data

Reimplemented from SocketIO.

Definition at line 222 of file m_ssl.cpp.

References sslsock, and TotalWritten.


Field Documentation

Definition at line 30 of file m_ssl.cpp.

Referenced by Accept(), Destroy(), FinishAccept(), FinishConnect(), Recv(), Send(), and SSLSocketIO().


The documentation for this class was generated from the following file: