Do not re-initialize TLS context every connection

This commit is contained in:
Vitaliy Filippov
2026-04-04 19:01:49 +03:00
parent 553e153c16
commit dcd545a1a5
3 changed files with 39 additions and 44 deletions
+2 -1
View File
@@ -44,9 +44,10 @@ struct http_response_t
struct http_co_t;
http_co_t* http_init(timerfd_manager_t *tfd);
http_co_t* open_websocket(timerfd_manager_t *tfd, const std::string & host, const std::string & path,
void open_websocket(http_co_t *handler, const std::string & host, const std::string & path,
const http_options_t & options, std::function<void(const http_response_t *msg)> on_message);
void http_request(http_co_t *handler, const std::string & host, const std::string & request,
const http_options_t & options, std::function<void(const http_response_t *response)> response_callback);
void http_post_message(http_co_t *handler, uint8_t type, const std::string & msg);
void http_close(http_co_t *co);
void http_destroy(http_co_t *co);