mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 06:51:08 +01:00
ircd::resource::response::chunked: Additional overload for buffer w/o headers; fix comment.
This commit is contained in:
parent
f54b31358a
commit
981006d831
2 changed files with 20 additions and 2 deletions
|
@ -72,7 +72,7 @@ struct ircd::resource::response
|
||||||
/// something like json::stack, which streams chunks of JSON. To facilitate
|
/// something like json::stack, which streams chunks of JSON. To facilitate
|
||||||
/// this type of pairing and real world use, instances of this object contain
|
/// this type of pairing and real world use, instances of this object contain
|
||||||
/// a simple buffered flush-callback system.
|
/// a simple buffered flush-callback system.
|
||||||
//
|
///
|
||||||
/// By default this object allocates a buffer to facilitate the chunked
|
/// By default this object allocates a buffer to facilitate the chunked
|
||||||
/// response and to satisfy the majority pattern of allocating this same
|
/// response and to satisfy the majority pattern of allocating this same
|
||||||
/// buffer immediately preceding construction. A function pointer can also
|
/// buffer immediately preceding construction. A function pointer can also
|
||||||
|
@ -102,8 +102,9 @@ struct ircd::resource::response::chunked
|
||||||
|
|
||||||
std::function<const_buffer (const const_buffer &)> flusher();
|
std::function<const_buffer (const const_buffer &)> flusher();
|
||||||
|
|
||||||
chunked(client &, const http::code &, const string_view &content_type, const string_view &headers = {}, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
chunked(client &, const http::code &, const string_view &content_type, const string_view &headers, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
||||||
chunked(client &, const http::code &, const string_view &content_type, const vector_view<const http::header> &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
chunked(client &, const http::code &, const string_view &content_type, const vector_view<const http::header> &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
||||||
|
chunked(client &, const http::code &, const string_view &content_type, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
||||||
chunked(client &, const http::code &, const vector_view<const http::header> &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
chunked(client &, const http::code &, const vector_view<const http::header> &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
||||||
chunked(client &, const http::code &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
chunked(client &, const http::code &, const size_t &buffer_size = default_buffer_size, const mutable_buffer & = {});
|
||||||
chunked() = default;
|
chunked() = default;
|
||||||
|
|
|
@ -852,6 +852,23 @@ ircd::resource::response::chunked::chunked(client &client,
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ircd::resource::response::chunked::chunked(client &client,
|
||||||
|
const http::code &code,
|
||||||
|
const string_view &content_type,
|
||||||
|
const size_t &buffer_size,
|
||||||
|
const mutable_buffer &buf)
|
||||||
|
:chunked
|
||||||
|
{
|
||||||
|
client,
|
||||||
|
code,
|
||||||
|
content_type,
|
||||||
|
string_view{}, // headers
|
||||||
|
buffer_size,
|
||||||
|
buf,
|
||||||
|
}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
ircd::resource::response::chunked::chunked(client &client,
|
ircd::resource::response::chunked::chunked(client &client,
|
||||||
const http::code &code,
|
const http::code &code,
|
||||||
const string_view &content_type,
|
const string_view &content_type,
|
||||||
|
|
Loading…
Reference in a new issue