anthracite/lib/socket/openssl_socket.hpp
Nicholas Orlowsky ca05aa1e5a
Some checks failed
Docker Build & Publish / build (push) Has been cancelled
event loop with threadmgr
2025-02-21 14:09:01 -05:00

23 lines
540 B
C++

#pragma once
#include "./socket.hpp"
#include <openssl/ssl.h>
#include <openssl/err.h>
namespace anthracite::socket {
class openssl_socket : public anthracite_socket {
private:
static SSL_CTX* _context;
SSL* _ssl;
public:
openssl_socket(int port, int max_queue = MAX_QUEUE_LENGTH);
~openssl_socket();
bool wait_for_conn() override;
void close_conn() override;
void send_message(std::string& msg) override;
std::string recv_message(int buffer_size) override;
};
};