3 #include <openssl/types.h>
4 #include <openssl/x509.h>
45 void connect(
const string& hostname,
const unsigned int port);
54 size_t read(
void* buf,
const size_t bytes);
63 size_t write(
void* buf,
const size_t bytes);
90 SSL_CTX*
ctx =
nullptr;
Class representing a secure TCP socket.
static int openSSLVerifyCallback(int preverify, X509_STORE_CTX *x509_ctx)
OpenSSL verify callback.
size_t read(void *buf, const size_t bytes)
Reads up to "bytes" bytes from socket.
size_t write(void *buf, const size_t bytes)
Writes up to "bytes" bytes to socket.
virtual void close()
Closes the socket.
const string openSSLGetErrors()
SecureTCPSocket()
Public Constructor.
virtual void shutdown()
shuts socket down for reading and writing
void connect(const string &hostname, const unsigned int port)
Connects a socket to given remote IP and port.
virtual ~SecureTCPSocket()
Public destructor.
Class representing a TCP socket.
#define FORBID_CLASS_COPY(CLASS)