31 using Ptr = std::shared_ptr<HttpConnection>;
48 std::unique_ptr<iocp::IOBufNode>
node;
68 virtual void writeBlock(
const char *buffer,
size_t length,
69 const std::function<
void(
const asio::error_code &code)> &
callback) = 0;
75 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &
93 using Ptr = std::shared_ptr<HttpConnectionImpl>;
94 using Socket = asio::ip::tcp::socket;
97 Ptr getPtr() {
return std::reinterpret_pointer_cast<HttpConnectionImpl>(shared_from_this()); }
104 void writeBlock(
const char *buffer,
size_t length,
105 const std::function<
void(
const asio::error_code &code)> &
callback)
override;
108 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &
116 using Ptr = std::shared_ptr<HttpsConnectionImpl>;
117 using Stream = asio::ssl::stream<asio::ip::tcp::socket>;
120 Ptr getPtr() {
return std::reinterpret_pointer_cast<HttpsConnectionImpl>(shared_from_this()); }
129 void writeBlock(
const char *buffer,
size_t length,
130 const std::function<
void(
const asio::error_code &code)> &
callback)
override;
133 const std::function<
void(
const asio::error_code &error, std::size_t bytes_transferred)> &