29#include <sptk5/sptk.h>
32#include <sptk5/net/SSLContext.h>
33#include <sptk5/net/SSLKeys.h>
34#include <sptk5/net/TCPSocket.h>
99 void attach(SOCKET socketHandle,
bool accept)
override;
122 size_t recv(uint8_t* buffer,
size_t size)
override;
130 size_t send(
const uint8_t* buffer,
size_t len)
override;
148 void _open(
const Host& host,
OpenMode openMode,
bool blockingMode, std::chrono::milliseconds timeout)
override;
157 void _open(
const struct sockaddr_in& address,
OpenMode openMode,
bool blockingMode, std::chrono::milliseconds timeout)
override;
168 SharedSSLContext m_sslContext {
nullptr};
169 SSL* m_ssl {
nullptr};
172 String m_sniHostName;
175 void openSocketFD(
bool blockingMode,
const std::chrono::milliseconds& timeout);
177 bool tryConnect(
const DateTime& timeoutAt);
OpenMode
Definition: BaseSocket.h:93
Definition: SSLSocket.h:48
void close() noexcept override
void initContextAndSocket()
SSLSocket(const String &cipherList="ALL")
size_t recv(uint8_t *buffer, size_t size) override
void _open(const struct sockaddr_in &address, OpenMode openMode, bool blockingMode, std::chrono::milliseconds timeout) override
void _open(const Host &host, OpenMode openMode, bool blockingMode, std::chrono::milliseconds timeout) override
void loadKeys(const SSLKeys &keys)
size_t send(const uint8_t *buffer, size_t len) override
virtual String getSSLError(const std::string &function, int32_t SSLError) const
void attach(SOCKET socketHandle, bool accept) override
size_t socketBytes() override
void setSNIHostName(const String &sniHostName)
void throwSSLError(const String &function, int resultCode) const
Definition: TCPSocket.h:165