#include <Ssl.h>
Public Methods | |
Ssl () | |
~Ssl () | |
void | setTimeOut (bool infinite, int tv_sec, int tv_usec) |
bool | open (bool server_mode, SslCtx &ssl_ctx, OS_SPEC_SOCKET_TYPE sock) |
void | shutdown (void) |
int | read (void *buff, int count) |
int | write (void *buff, int count) |
SSL * | getSsl (void) |
OS_SPEC_SOCKET_TYPE | getStream (void) |
Private Attributes | |
SSL * | m_ssl |
Mutex | m_lock |
OS_SPEC_SOCKET_TYPE | m_sock |
bool | m_timeout_infinite |
timeval | m_timeout |
Definition at line 11 of file Ssl.h.
|
|
|
|
|
Get internal SSL struct. |
|
Get stream associated with SSL. |
|
Establishes an SSL connection.
Definition at line 54 of file Ssl.cpp. Referenced by SslConnection::accept(), and SslConnection::connect().
|
|
Attempts to read up to 'count' bytes from the ssl-connection into the buffer starting at 'buff'. read() waits for packets during the timeout period if timeout is set, i.e. if the timeout is not infinite. Otherwise, read() waits for packets forever. read() internally lock Ssl class while reading.
Definition at line 128 of file Ssl.cpp. Referenced by SslConnection::read().
|
|
Sets the timeout during which Ssl waits for packets. The "read" function returns an error if no packet arrives within timeout period.
Definition at line 37 of file Ssl.cpp. Referenced by SslConnection::accept(), and SslConnection::connect().
|
|
Closes the established SSL connection by sending shutdown requests. Definition at line 103 of file Ssl.cpp. Referenced by ~Ssl().
|
|
write() writes up to 'count' bytes to the SSL connection from the buffer starting at 'buff'. write() waits for the condition in which Ssl can send packets during the timeout period if timeout is set. Otherwise, write() waits for the condition forever. write() internally lock Ssl class while writing.
Definition at line 167 of file Ssl.cpp. Referenced by SslConnection::write().
|
|
|
|
|
|
|
|
|
|
|