MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / SSLSocketStream

Class SSLSocketStream

external/httplib.h:3233–3255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3231
3232#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
3233class SSLSocketStream final : public Stream {
3234public:
3235 SSLSocketStream(socket_t sock, SSL *ssl, time_t read_timeout_sec,
3236 time_t read_timeout_usec, time_t write_timeout_sec,
3237 time_t write_timeout_usec);
3238 ~SSLSocketStream() override;
3239
3240 bool is_readable() const override;
3241 bool is_writable() const override;
3242 ssize_t read(char *ptr, size_t size) override;
3243 ssize_t write(const char *ptr, size_t size) override;
3244 void get_remote_ip_and_port(std::string &ip, int &port) const override;
3245 void get_local_ip_and_port(std::string &ip, int &port) const override;
3246 socket_t socket() const override;
3247
3248private:
3249 socket_t sock_;
3250 SSL *ssl_;
3251 time_t read_timeout_sec_;
3252 time_t read_timeout_usec_;
3253 time_t write_timeout_sec_;
3254 time_t write_timeout_usec_;
3255};
3256#endif
3257
3258inline bool keep_alive(const std::atomic<socket_t> &svr_sock, socket_t sock,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected