MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / SSLSocketStream

Method SSLSocketStream

source/src/httplib/httplib.h:10748–10766  ·  view source on GitHub ↗

SSL socket stream implementation

Source from the content-addressed store, hash-verified

10746
10747// SSL socket stream implementation
10748inline SSLSocketStream::SSLSocketStream(
10749 socket_t sock, tls::session_t session, time_t read_timeout_sec,
10750 time_t read_timeout_usec, time_t write_timeout_sec,
10751 time_t write_timeout_usec, time_t max_timeout_msec,
10752 std::chrono::time_point<std::chrono::steady_clock> start_time)
10753 : sock_(sock), session_(session), read_timeout_sec_(read_timeout_sec),
10754 read_timeout_usec_(read_timeout_usec),
10755 write_timeout_sec_(write_timeout_sec),
10756 write_timeout_usec_(write_timeout_usec),
10757 max_timeout_msec_(max_timeout_msec), start_time_(start_time) {
10758#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
10759 // Clear AUTO_RETRY for proper non-blocking I/O timeout handling
10760 // Note: create_session() also clears this, but SSLClient currently
10761 // uses ssl_new() which does not. Until full TLS API migration is complete,
10762 // we need to ensure AUTO_RETRY is cleared here regardless of how the
10763 // SSL session was created.
10764 SSL_clear_mode(static_cast<SSL *>(session), SSL_MODE_AUTO_RETRY);
10765#endif
10766}
10767
10768inline SSLSocketStream::~SSLSocketStream() = default;
10769

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected