31 using Ptr = std::shared_ptr<HttpConnection>;
48 std::unique_ptr<iocp::IOBufNode>
node;
69 virtual void writeBlock(
const char *buffer,
size_t length,
70 const std::function<
void(
const asio::error_code &code)> &
callback) = 0;
76 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &
94 using Ptr = std::shared_ptr<HttpConnectionImpl>;
95 using Socket = asio::ip::tcp::socket;
98 Ptr getPtr() {
return std::reinterpret_pointer_cast<HttpConnectionImpl>(shared_from_this()); }
105 void writeBlock(
const char *buffer,
size_t length,
106 const std::function<
void(
const asio::error_code &code)> &
callback)
override;
109 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &
117 using Ptr = std::shared_ptr<HttpsConnectionImpl>;
118 using Stream = asio::ssl::stream<asio::ip::tcp::socket>;
121 Ptr getPtr() {
return std::reinterpret_pointer_cast<HttpsConnectionImpl>(shared_from_this()); }
130 void writeBlock(
const char *buffer,
size_t length,
131 const std::function<
void(
const asio::error_code &code)> &
callback)
override;
134 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &