Rename DynamicBufferSequence to DynamicBuffer, is_dynamic_buffer_sequence to is_dynamic_buffer.

This commit is contained in:
Christopher Kohlhoff 2016-09-21 18:17:59 +10:00
parent 7b0a61e300
commit 69a03d7b6b
12 changed files with 444 additions and 448 deletions

View File

@ -369,14 +369,13 @@ struct is_const_buffer_sequence
{
};
/// Trait to determine whether a type satisfies the DynamicBufferSequence
/// requirements.
/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
template <typename T>
struct is_dynamic_buffer_sequence
struct is_dynamic_buffer
#if defined(GENERATING_DOCUMENTATION)
: integral_constant<bool, automatically_determined>
#else // defined(GENERATING_DOCUMENTATION)
: asio::detail::is_dynamic_buffer_sequence<T>
: asio::detail::is_dynamic_buffer<T>
#endif // defined(GENERATING_DOCUMENTATION)
{
};
@ -1477,7 +1476,7 @@ inline ASIO_CONST_BUFFER buffer(
/*@}*/
/// Adapt a basic_string to the DynamicBufferSequence requirements.
/// Adapt a basic_string to the DynamicBuffer requirements.
/**
* Requires that <tt>sizeof(Elem) == 1</tt>.
*/
@ -1628,7 +1627,7 @@ private:
const std::size_t max_size_;
};
/// Adapt a vector to the DynamicBufferSequence requirements.
/// Adapt a vector to the DynamicBuffer requirements.
/**
* Requires that <tt>sizeof(Elem) == 1</tt>.
*/

View File

@ -209,7 +209,7 @@ struct is_buffer_sequence<const_buffer, mutable_buffer>
};
template <typename T>
struct is_dynamic_buffer_sequence_class
struct is_dynamic_buffer_class
: integral_constant<bool,
sizeof(size_memfn_helper<T>(0)) != 1 &&
sizeof(max_size_memfn_helper<T>(0)) != 1 &&
@ -224,9 +224,9 @@ struct is_dynamic_buffer_sequence_class
};
template <typename T>
struct is_dynamic_buffer_sequence
struct is_dynamic_buffer
: conditional<is_class<T>::value,
is_dynamic_buffer_sequence_class<T>,
is_dynamic_buffer_class<T>,
false_type>::type
{
};

View File

@ -107,17 +107,17 @@ inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBufferSequence,
template <typename SyncReadStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
ec = asio::error_code();
std::size_t total_transferred = 0;
@ -140,44 +140,44 @@ std::size_t read(SyncReadStream& s,
return total_transferred;
}
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), transfer_all(), ec);
ASIO_MOVE_CAST(DynamicBuffer)(buffers), transfer_all(), ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
return read(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
return read(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
transfer_all(), ec);
}
template <typename SyncReadStream, typename DynamicBufferSequence,
template <typename SyncReadStream, typename DynamicBuffer,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
asio::error_code ec;
std::size_t bytes_transferred = read(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
completion_condition, ec);
asio::detail::throw_error(ec, "read");
return bytes_transferred;
@ -456,7 +456,7 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
namespace detail
{
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
class read_dynbuf_op
: detail::base_from_completion_cond<CompletionCondition>
@ -490,7 +490,7 @@ namespace detail
read_dynbuf_op(read_dynbuf_op&& other)
: detail::base_from_completion_cond<CompletionCondition>(other),
stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
start_(other.start_),
total_transferred_(other.total_transferred_),
handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_))
@ -534,36 +534,36 @@ namespace detail
//private:
AsyncReadStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
int start_;
std::size_t total_transferred_;
ReadHandler handler_;
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
inline void* asio_handler_allocate(std::size_t size,
read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
read_dynbuf_op<AsyncReadStream, DynamicBuffer,
CompletionCondition, ReadHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
read_dynbuf_op<AsyncReadStream, DynamicBuffer,
CompletionCondition, ReadHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
read_dynbuf_op<AsyncReadStream, DynamicBuffer,
CompletionCondition, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
@ -572,10 +572,10 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename CompletionCondition,
typename DynamicBuffer, typename CompletionCondition,
typename ReadHandler>
inline void asio_handler_invoke(Function& function,
read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
read_dynbuf_op<AsyncReadStream, DynamicBuffer,
CompletionCondition, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -583,10 +583,10 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename CompletionCondition,
typename DynamicBuffer, typename CompletionCondition,
typename ReadHandler>
inline void asio_handler_invoke(const Function& function,
read_dynbuf_op<AsyncReadStream, DynamicBufferSequence,
read_dynbuf_op<AsyncReadStream, DynamicBuffer,
CompletionCondition, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -596,36 +596,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler, typename Allocator>
struct associated_allocator<
detail::read_dynbuf_op<AsyncReadStream,
DynamicBufferSequence, CompletionCondition, ReadHandler>,
DynamicBuffer, CompletionCondition, ReadHandler>,
Allocator>
{
typedef typename associated_allocator<ReadHandler, Allocator>::type type;
static type get(
const detail::read_dynbuf_op<AsyncReadStream,
DynamicBufferSequence, CompletionCondition, ReadHandler>& h,
DynamicBuffer, CompletionCondition, ReadHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler, typename Executor>
struct associated_executor<
detail::read_dynbuf_op<AsyncReadStream,
DynamicBufferSequence, CompletionCondition, ReadHandler>,
DynamicBuffer, CompletionCondition, ReadHandler>,
Executor>
{
typedef typename associated_executor<ReadHandler, Executor>::type type;
static type get(
const detail::read_dynbuf_op<AsyncReadStream,
DynamicBufferSequence, CompletionCondition, ReadHandler>& h,
DynamicBuffer, CompletionCondition, ReadHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@ -635,31 +635,31 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
return async_read(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
transfer_all(), ASIO_MOVE_CAST(ReadHandler)(handler));
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
inline ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
// If you get an error on the following line it means that your handler does
@ -670,10 +670,10 @@ async_read(AsyncReadStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::read_dynbuf_op<AsyncReadStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
CompletionCondition, ASIO_HANDLER_TYPE(
ReadHandler, void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
completion_condition, init.completion_handler)(
asio::error_code(), 0, 1);

View File

@ -35,30 +35,30 @@
namespace asio {
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim)
ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec);
ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
char delim, asio::error_code& ec)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
typedef typename DynamicBuffer::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@ -96,14 +96,14 @@ std::size_t read_until(SyncReadStream& s,
}
}
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::string& delim)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), delim, ec);
ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
@ -143,19 +143,19 @@ namespace detail
}
} // namespace detail
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::string& delim, asio::error_code& ec)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
typedef typename DynamicBuffer::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@ -205,31 +205,31 @@ std::size_t read_until(SyncReadStream& s,
#if !defined(ASIO_NO_EXTENSIONS)
#if defined(ASIO_HAS_BOOST_REGEX)
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
inline std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers), expr, ec);
ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr, asio::error_code& ec)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
typedef typename DynamicBuffer::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@ -279,35 +279,35 @@ std::size_t read_until(SyncReadStream& s,
#endif // defined(ASIO_HAS_BOOST_REGEX)
template <typename SyncReadStream,
typename DynamicBufferSequence, typename MatchCondition>
typename DynamicBuffer, typename MatchCondition>
inline std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition,
typename enable_if<is_match_condition<MatchCondition>::value>::type*)
{
asio::error_code ec;
std::size_t bytes_transferred = read_until(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
match_condition, ec);
asio::detail::throw_error(ec, "read_until");
return bytes_transferred;
}
template <typename SyncReadStream,
typename DynamicBufferSequence, typename MatchCondition>
typename DynamicBuffer, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition, asio::error_code& ec,
typename enable_if<is_match_condition<MatchCondition>::value>::type*)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
std::size_t search_position = 0;
for (;;)
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type buffers_type;
typedef typename DynamicBuffer::const_buffers_type buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = b.data();
iterator begin = iterator::begin(data_buffers);
@ -424,7 +424,7 @@ inline std::size_t read_until(SyncReadStream& s,
namespace detail
{
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
class read_until_delim_op
{
public:
@ -454,7 +454,7 @@ namespace detail
read_until_delim_op(read_until_delim_op&& other)
: stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
delim_(other.delim_),
start_(other.start_),
search_position_(other.search_position_),
@ -475,7 +475,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type
typedef typename DynamicBuffer::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@ -539,7 +539,7 @@ namespace detail
//private:
AsyncReadStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
char delim_;
int start_;
std::size_t search_position_;
@ -547,30 +547,30 @@ namespace detail
};
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void* asio_handler_allocate(std::size_t size,
read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
@ -578,20 +578,20 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_invoke(Function& function,
read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_invoke(const Function& function,
read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
@ -600,36 +600,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename ReadHandler, typename Allocator>
struct associated_allocator<
detail::read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>,
DynamicBuffer, ReadHandler>,
Allocator>
{
typedef typename associated_allocator<ReadHandler, Allocator>::type type;
static type get(
const detail::read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>& h,
DynamicBuffer, ReadHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename ReadHandler, typename Executor>
struct associated_executor<
detail::read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>,
DynamicBuffer, ReadHandler>,
Executor>
{
typedef typename associated_executor<ReadHandler, Executor>::type type;
static type get(
const detail::read_until_delim_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>& h,
DynamicBuffer, ReadHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@ -639,11 +639,11 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
char delim, ASIO_MOVE_ARG(ReadHandler) handler)
{
// If you get an error on the following line it means that your handler does
@ -654,10 +654,10 @@ async_read_until(AsyncReadStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::read_until_delim_op<AsyncReadStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
ASIO_HANDLER_TYPE(ReadHandler,
void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
delim, init.completion_handler)(asio::error_code(), 0, 1);
return init.result.get();
@ -666,7 +666,7 @@ async_read_until(AsyncReadStream& s,
namespace detail
{
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
class read_until_delim_string_op
{
public:
@ -696,7 +696,7 @@ namespace detail
read_until_delim_string_op(read_until_delim_string_op&& other)
: stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
start_(other.start_),
search_position_(other.search_position_),
@ -717,7 +717,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type
typedef typename DynamicBuffer::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@ -792,7 +792,7 @@ namespace detail
//private:
AsyncReadStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
std::string delim_;
int start_;
std::size_t search_position_;
@ -800,30 +800,30 @@ namespace detail
};
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void* asio_handler_allocate(std::size_t size,
read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
@ -831,20 +831,20 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_invoke(Function& function,
read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
inline void asio_handler_invoke(const Function& function,
read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>* this_handler)
DynamicBuffer, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
@ -853,36 +853,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename ReadHandler, typename Allocator>
struct associated_allocator<
detail::read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>,
DynamicBuffer, ReadHandler>,
Allocator>
{
typedef typename associated_allocator<ReadHandler, Allocator>::type type;
static type get(
const detail::read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>& h,
DynamicBuffer, ReadHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename ReadHandler, typename Executor>
struct associated_executor<
detail::read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>,
DynamicBuffer, ReadHandler>,
Executor>
{
typedef typename associated_executor<ReadHandler, Executor>::type type;
static type get(
const detail::read_until_delim_string_op<AsyncReadStream,
DynamicBufferSequence, ReadHandler>& h,
DynamicBuffer, ReadHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@ -892,11 +892,11 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::string& delim, ASIO_MOVE_ARG(ReadHandler) handler)
{
// If you get an error on the following line it means that your handler does
@ -907,10 +907,10 @@ async_read_until(AsyncReadStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::read_until_delim_string_op<AsyncReadStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
ASIO_HANDLER_TYPE(ReadHandler,
void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
delim, init.completion_handler)(asio::error_code(), 0, 1);
return init.result.get();
@ -921,7 +921,7 @@ async_read_until(AsyncReadStream& s,
namespace detail
{
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler>
class read_until_expr_op
{
@ -952,7 +952,7 @@ namespace detail
read_until_expr_op(read_until_expr_op&& other)
: stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
expr_(other.expr_),
start_(other.start_),
search_position_(other.search_position_),
@ -973,7 +973,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type
typedef typename DynamicBuffer::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@ -1051,38 +1051,38 @@ namespace detail
//private:
AsyncReadStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
RegEx expr_;
int start_;
std::size_t search_position_;
ReadHandler handler_;
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler>
inline void* asio_handler_allocate(std::size_t size,
read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
DynamicBuffer, RegEx, ReadHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
DynamicBuffer, RegEx, ReadHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
DynamicBuffer, RegEx, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
: asio_handler_cont_helpers::is_continuation(
@ -1090,20 +1090,20 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename RegEx, typename ReadHandler>
typename DynamicBuffer, typename RegEx, typename ReadHandler>
inline void asio_handler_invoke(Function& function,
read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
DynamicBuffer, RegEx, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename RegEx, typename ReadHandler>
typename DynamicBuffer, typename RegEx, typename ReadHandler>
inline void asio_handler_invoke(const Function& function,
read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>* this_handler)
DynamicBuffer, RegEx, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
@ -1112,36 +1112,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler, typename Allocator>
struct associated_allocator<
detail::read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>,
DynamicBuffer, RegEx, ReadHandler>,
Allocator>
{
typedef typename associated_allocator<ReadHandler, Allocator>::type type;
static type get(
const detail::read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>& h,
DynamicBuffer, RegEx, ReadHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename RegEx, typename ReadHandler, typename Executor>
struct associated_executor<
detail::read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>,
DynamicBuffer, RegEx, ReadHandler>,
Executor>
{
typedef typename associated_executor<ReadHandler, Executor>::type type;
static type get(
const detail::read_until_expr_op<AsyncReadStream,
DynamicBufferSequence, RegEx, ReadHandler>& h,
DynamicBuffer, RegEx, ReadHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@ -1151,11 +1151,11 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr,
ASIO_MOVE_ARG(ReadHandler) handler)
{
@ -1167,10 +1167,10 @@ async_read_until(AsyncReadStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::read_until_expr_op<AsyncReadStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
boost::regex, ASIO_HANDLER_TYPE(ReadHandler,
void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
expr, init.completion_handler)(asio::error_code(), 0, 1);
return init.result.get();
@ -1180,7 +1180,7 @@ async_read_until(AsyncReadStream& s,
namespace detail
{
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
class read_until_match_op
{
@ -1211,7 +1211,7 @@ namespace detail
read_until_match_op(read_until_match_op&& other)
: stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
match_condition_(other.match_condition_),
start_(other.start_),
search_position_(other.search_position_),
@ -1232,7 +1232,7 @@ namespace detail
{
{
// Determine the range of the data to be searched.
typedef typename DynamicBufferSequence::const_buffers_type
typedef typename DynamicBuffer::const_buffers_type
buffers_type;
typedef buffers_iterator<buffers_type> iterator;
buffers_type data_buffers = buffers_.data();
@ -1306,37 +1306,37 @@ namespace detail
//private:
AsyncReadStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
MatchCondition match_condition_;
int start_;
std::size_t search_position_;
ReadHandler handler_;
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
inline void* asio_handler_allocate(std::size_t size,
read_until_match_op<AsyncReadStream, DynamicBufferSequence,
read_until_match_op<AsyncReadStream, DynamicBuffer,
MatchCondition, ReadHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
read_until_match_op<AsyncReadStream, DynamicBufferSequence,
read_until_match_op<AsyncReadStream, DynamicBuffer,
MatchCondition, ReadHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
inline bool asio_handler_is_continuation(
read_until_match_op<AsyncReadStream, DynamicBufferSequence,
read_until_match_op<AsyncReadStream, DynamicBuffer,
MatchCondition, ReadHandler>* this_handler)
{
return this_handler->start_ == 0 ? true
@ -1345,10 +1345,10 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename MatchCondition,
typename DynamicBuffer, typename MatchCondition,
typename ReadHandler>
inline void asio_handler_invoke(Function& function,
read_until_match_op<AsyncReadStream, DynamicBufferSequence,
read_until_match_op<AsyncReadStream, DynamicBuffer,
MatchCondition, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -1356,10 +1356,10 @@ namespace detail
}
template <typename Function, typename AsyncReadStream,
typename DynamicBufferSequence, typename MatchCondition,
typename DynamicBuffer, typename MatchCondition,
typename ReadHandler>
inline void asio_handler_invoke(const Function& function,
read_until_match_op<AsyncReadStream, DynamicBufferSequence,
read_until_match_op<AsyncReadStream, DynamicBuffer,
MatchCondition, ReadHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -1369,36 +1369,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler, typename Allocator>
struct associated_allocator<
detail::read_until_match_op<AsyncReadStream,
DynamicBufferSequence, MatchCondition, ReadHandler>,
DynamicBuffer, MatchCondition, ReadHandler>,
Allocator>
{
typedef typename associated_allocator<ReadHandler, Allocator>::type type;
static type get(
const detail::read_until_match_op<AsyncReadStream,
DynamicBufferSequence, MatchCondition, ReadHandler>& h,
DynamicBuffer, MatchCondition, ReadHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler, typename Executor>
struct associated_executor<
detail::read_until_match_op<AsyncReadStream,
DynamicBufferSequence, MatchCondition, ReadHandler>,
DynamicBuffer, MatchCondition, ReadHandler>,
Executor>
{
typedef typename associated_executor<ReadHandler, Executor>::type type;
static type get(
const detail::read_until_match_op<AsyncReadStream,
DynamicBufferSequence, MatchCondition, ReadHandler>& h,
DynamicBuffer, MatchCondition, ReadHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
@ -1407,12 +1407,12 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<is_match_condition<MatchCondition>::value>::type*)
{
@ -1424,10 +1424,10 @@ async_read_until(AsyncReadStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::read_until_match_op<AsyncReadStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
MatchCondition, ASIO_HANDLER_TYPE(ReadHandler,
void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
match_condition, init.completion_handler)(
asio::error_code(), 0, 1);

View File

@ -105,62 +105,62 @@ inline std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
return bytes_transferred;
}
template <typename SyncWriteStream, typename DynamicBufferSequence,
template <typename SyncWriteStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
typename decay<DynamicBufferSequence>::type b(
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers));
typename decay<DynamicBuffer>::type b(
ASIO_MOVE_CAST(DynamicBuffer)(buffers));
std::size_t bytes_transferred = write(s, b.data(), completion_condition, ec);
b.consume(bytes_transferred);
return bytes_transferred;
}
template <typename SyncWriteStream, typename DynamicBufferSequence>
template <typename SyncWriteStream, typename DynamicBuffer>
inline std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
transfer_all(), ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
}
template <typename SyncWriteStream, typename DynamicBufferSequence>
template <typename SyncWriteStream, typename DynamicBuffer>
inline std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
return write(s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
return write(s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
transfer_all(), ec);
}
template <typename SyncWriteStream, typename DynamicBufferSequence,
template <typename SyncWriteStream, typename DynamicBuffer,
typename CompletionCondition>
inline std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
asio::error_code ec;
std::size_t bytes_transferred = write(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
completion_condition, ec);
asio::detail::throw_error(ec, "write");
return bytes_transferred;
@ -440,7 +440,7 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
namespace detail
{
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
class write_dynbuf_op
{
@ -468,7 +468,7 @@ namespace detail
write_dynbuf_op(write_dynbuf_op&& other)
: stream_(other.stream_),
buffers_(ASIO_MOVE_CAST(DynamicBufferSequence)(other.buffers_)),
buffers_(ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
completion_condition_(
ASIO_MOVE_CAST(CompletionCondition)(
other.completion_condition_)),
@ -493,35 +493,35 @@ namespace detail
//private:
AsyncWriteStream& stream_;
DynamicBufferSequence buffers_;
DynamicBuffer buffers_;
CompletionCondition completion_condition_;
WriteHandler handler_;
};
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
inline void* asio_handler_allocate(std::size_t size,
write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
CompletionCondition, WriteHandler>* this_handler)
{
return asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
}
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
inline void asio_handler_deallocate(void* pointer, std::size_t size,
write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
CompletionCondition, WriteHandler>* this_handler)
{
asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
}
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
inline bool asio_handler_is_continuation(
write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
CompletionCondition, WriteHandler>* this_handler)
{
return asio_handler_cont_helpers::is_continuation(
@ -529,10 +529,10 @@ namespace detail
}
template <typename Function, typename AsyncWriteStream,
typename DynamicBufferSequence, typename CompletionCondition,
typename DynamicBuffer, typename CompletionCondition,
typename WriteHandler>
inline void asio_handler_invoke(Function& function,
write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
CompletionCondition, WriteHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -540,10 +540,10 @@ namespace detail
}
template <typename Function, typename AsyncWriteStream,
typename DynamicBufferSequence, typename CompletionCondition,
typename DynamicBuffer, typename CompletionCondition,
typename WriteHandler>
inline void asio_handler_invoke(const Function& function,
write_dynbuf_op<AsyncWriteStream, DynamicBufferSequence,
write_dynbuf_op<AsyncWriteStream, DynamicBuffer,
CompletionCondition, WriteHandler>* this_handler)
{
asio_handler_invoke_helpers::invoke(
@ -553,36 +553,36 @@ namespace detail
#if !defined(GENERATING_DOCUMENTATION)
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler, typename Allocator>
struct associated_allocator<
detail::write_dynbuf_op<AsyncWriteStream,
DynamicBufferSequence, CompletionCondition, WriteHandler>,
DynamicBuffer, CompletionCondition, WriteHandler>,
Allocator>
{
typedef typename associated_allocator<WriteHandler, Allocator>::type type;
static type get(
const detail::write_dynbuf_op<AsyncWriteStream,
DynamicBufferSequence, CompletionCondition, WriteHandler>& h,
DynamicBuffer, CompletionCondition, WriteHandler>& h,
const Allocator& a = Allocator()) ASIO_NOEXCEPT
{
return associated_allocator<WriteHandler, Allocator>::get(h.handler_, a);
}
};
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler, typename Executor>
struct associated_executor<
detail::write_dynbuf_op<AsyncWriteStream,
DynamicBufferSequence, CompletionCondition, WriteHandler>,
DynamicBuffer, CompletionCondition, WriteHandler>,
Executor>
{
typedef typename associated_executor<WriteHandler, Executor>::type type;
static type get(
const detail::write_dynbuf_op<AsyncWriteStream,
DynamicBufferSequence, CompletionCondition, WriteHandler>& h,
DynamicBuffer, CompletionCondition, WriteHandler>& h,
const Executor& ex = Executor()) ASIO_NOEXCEPT
{
return associated_executor<WriteHandler, Executor>::get(h.handler_, ex);
@ -592,31 +592,31 @@ struct associated_executor<
#endif // !defined(GENERATING_DOCUMENTATION)
template <typename AsyncWriteStream,
typename DynamicBufferSequence, typename WriteHandler>
typename DynamicBuffer, typename WriteHandler>
inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
void (asio::error_code, std::size_t))
async_write(AsyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
return async_write(s,
ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
ASIO_MOVE_CAST(DynamicBuffer)(buffers),
transfer_all(), ASIO_MOVE_CAST(WriteHandler)(handler));
}
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
inline ASIO_INITFN_RESULT_TYPE(WriteHandler,
void (asio::error_code, std::size_t))
async_write(AsyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type*)
{
// If you get an error on the following line it means that your handler does
@ -627,10 +627,10 @@ async_write(AsyncWriteStream& s,
void (asio::error_code, std::size_t)> init(handler);
detail::write_dynbuf_op<AsyncWriteStream,
typename decay<DynamicBufferSequence>::type,
typename decay<DynamicBuffer>::type,
CompletionCondition, ASIO_HANDLER_TYPE(
WriteHandler, void (asio::error_code, std::size_t))>(
s, ASIO_MOVE_CAST(DynamicBufferSequence)(buffers),
s, ASIO_MOVE_CAST(DynamicBuffer)(buffers),
completion_condition, init.completion_handler)(
asio::error_code(), 0, 1);

View File

@ -250,11 +250,11 @@ std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
* s, buffers,
* asio::transfer_all()); @endcode
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@ -283,12 +283,12 @@ std::size_t read(SyncReadStream& s,
* s, buffers,
* asio::transfer_all(), ec); @endcode
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@ -327,13 +327,13 @@ std::size_t read(SyncReadStream& s,
*
* @throws asio::system_error Thrown on failure.
*/
template <typename SyncReadStream, typename DynamicBufferSequence,
template <typename SyncReadStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Attempt to read a certain amount of data from a stream before returning.
@ -373,13 +373,13 @@ std::size_t read(SyncReadStream& s,
* @returns The number of bytes read. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
template <typename SyncReadStream, typename DynamicBufferSequence,
template <typename SyncReadStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
#if !defined(ASIO_NO_EXTENSIONS)
@ -732,14 +732,14 @@ async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
* handler); @endcode
*/
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Start an asynchronous operation to read a certain amount of data from a
@ -800,16 +800,16 @@ async_read(AsyncReadStream& s,
* the handler will be performed in a manner equivalent to using
* asio::io_context::post().
*/
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename CompletionCondition, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
#if !defined(ASIO_NO_EXTENSIONS)

View File

@ -125,9 +125,9 @@ struct is_match_condition
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers, char delim);
ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim);
/// Read data into a dynamic buffer sequence until it contains a specified
/// delimiter.
@ -163,9 +163,9 @@ std::size_t read_until(SyncReadStream& s,
* typically leave that data in the dynamic buffer sequence for a subsequent
* read_until operation to examine.
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
char delim, asio::error_code& ec);
/// Read data into a dynamic buffer sequence until it contains a specified
@ -220,9 +220,9 @@ std::size_t read_until(SyncReadStream& s,
* @c read_until operation.
*/
template <typename SyncReadStream,
typename DynamicBufferSequence, typename Allocator>
typename DynamicBuffer, typename Allocator>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::basic_string<char, std::char_traits<char>, Allocator>& delim);
/// Read data into a dynamic buffer sequence until it contains a specified
@ -260,9 +260,9 @@ std::size_t read_until(SyncReadStream& s,
* read_until operation to examine.
*/
template <typename SyncReadStream,
typename DynamicBufferSequence, typename Allocator>
typename DynamicBuffer, typename Allocator>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::basic_string<char, std::char_traits<char>, Allocator>& delim,
asio::error_code& ec);
@ -324,9 +324,9 @@ std::size_t read_until(SyncReadStream& s,
* This data may be the start of a new line, to be extracted by a subsequent
* @c read_until operation.
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr);
/// Read data into a dynamic buffer sequence until some part of the data it
@ -365,9 +365,9 @@ std::size_t read_until(SyncReadStream& s,
* expression. An application will typically leave that data in the dynamic
* buffer sequence for a subsequent read_until operation to examine.
*/
template <typename SyncReadStream, typename DynamicBufferSequence>
template <typename SyncReadStream, typename DynamicBuffer>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr, asio::error_code& ec);
#endif // defined(ASIO_HAS_BOOST_REGEX)
@ -401,7 +401,7 @@ std::size_t read_until(SyncReadStream& s,
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
* @code buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
* @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@ -411,7 +411,7 @@ std::size_t read_until(SyncReadStream& s,
* @c second member of the return value is true if a match has been found, false
* otherwise.
*
* @returns The number of bytes in the dynamic_buffer_sequence's get area that
* @returns The number of bytes in the dynamic_buffer's get area that
* have been fully consumed by the match function.
*
* @throws asio::system_error Thrown on failure.
@ -476,9 +476,9 @@ std::size_t read_until(SyncReadStream& s,
* @endcode
*/
template <typename SyncReadStream,
typename DynamicBufferSequence, typename MatchCondition>
typename DynamicBuffer, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition,
typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
@ -509,7 +509,7 @@ std::size_t read_until(SyncReadStream& s,
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
* @code buffers_iterator<DynamicBufferSequence::const_buffers_type>
* @code buffers_iterator<DynamicBuffer::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@ -536,9 +536,9 @@ std::size_t read_until(SyncReadStream& s,
* function objects.
*/
template <typename SyncReadStream,
typename DynamicBufferSequence, typename MatchCondition>
typename DynamicBuffer, typename MatchCondition>
std::size_t read_until(SyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition, asio::error_code& ec,
typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
@ -1074,11 +1074,11 @@ std::size_t read_until(SyncReadStream& s,
* @c async_read_until operation.
*/
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
char delim, ASIO_MOVE_ARG(ReadHandler) handler);
/// Start an asynchronous operation to read data into a dynamic buffer sequence
@ -1164,11 +1164,11 @@ async_read_until(AsyncReadStream& s,
* @c async_read_until operation.
*/
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const std::string& delim,
ASIO_MOVE_ARG(ReadHandler) handler);
@ -1262,11 +1262,11 @@ async_read_until(AsyncReadStream& s,
* @c async_read_until operation.
*/
template <typename AsyncReadStream,
typename DynamicBufferSequence, typename ReadHandler>
typename DynamicBuffer, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
const boost::regex& expr,
ASIO_MOVE_ARG(ReadHandler) handler);
@ -1309,7 +1309,7 @@ async_read_until(AsyncReadStream& s,
* @code pair<iterator, bool> match_condition(iterator begin, iterator end);
* @endcode
* where @c iterator represents the type:
* @code buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
* @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
* @endcode
* The iterator parameters @c begin and @c end define the range of bytes to be
* scanned to determine whether there is a match. The @c first member of the
@ -1401,12 +1401,12 @@ async_read_until(AsyncReadStream& s,
* asio::async_read_until(s, data, match_char('a'), handler);
* @endcode
*/
template <typename AsyncReadStream, typename DynamicBufferSequence,
template <typename AsyncReadStream, typename DynamicBuffer,
typename MatchCondition, typename ReadHandler>
ASIO_INITFN_RESULT_TYPE(ReadHandler,
void (asio::error_code, std::size_t))
async_read_until(AsyncReadStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
MatchCondition match_condition, ASIO_MOVE_ARG(ReadHandler) handler,
typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);

View File

@ -249,11 +249,11 @@ std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
* s, buffers,
* asio::transfer_all()); @endcode
*/
template <typename SyncWriteStream, typename DynamicBufferSequence>
template <typename SyncWriteStream, typename DynamicBuffer>
std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Write all of the supplied data to a stream before returning.
@ -283,12 +283,12 @@ std::size_t write(SyncWriteStream& s,
* s, buffers,
* asio::transfer_all(), ec); @endcode
*/
template <typename SyncWriteStream, typename DynamicBufferSequence>
template <typename SyncWriteStream, typename DynamicBuffer>
std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Write a certain amount of data to a stream before returning.
@ -327,13 +327,13 @@ std::size_t write(SyncWriteStream& s,
*
* @throws asio::system_error Thrown on failure.
*/
template <typename SyncWriteStream, typename DynamicBufferSequence,
template <typename SyncWriteStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Write a certain amount of data to a stream before returning.
@ -373,13 +373,13 @@ std::size_t write(SyncWriteStream& s,
* @returns The number of bytes written. If an error occurs, returns the total
* number of bytes successfully transferred prior to the error.
*/
template <typename SyncWriteStream, typename DynamicBufferSequence,
template <typename SyncWriteStream, typename DynamicBuffer,
typename CompletionCondition>
std::size_t write(SyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition, asio::error_code& ec,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
#if !defined(ASIO_NO_EXTENSIONS)
@ -721,14 +721,14 @@ async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
* asio::io_context::post().
*/
template <typename AsyncWriteStream,
typename DynamicBufferSequence, typename WriteHandler>
typename DynamicBuffer, typename WriteHandler>
ASIO_INITFN_RESULT_TYPE(WriteHandler,
void (asio::error_code, std::size_t))
async_write(AsyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
/// Start an asynchronous operation to write a certain amount of data to a
@ -788,16 +788,16 @@ async_write(AsyncWriteStream& s,
* the handler will be performed in a manner equivalent to using
* asio::io_context::post().
*/
template <typename AsyncWriteStream, typename DynamicBufferSequence,
template <typename AsyncWriteStream, typename DynamicBuffer,
typename CompletionCondition, typename WriteHandler>
ASIO_INITFN_RESULT_TYPE(WriteHandler,
void (asio::error_code, std::size_t))
async_write(AsyncWriteStream& s,
ASIO_MOVE_ARG(DynamicBufferSequence) buffers,
ASIO_MOVE_ARG(DynamicBuffer) buffers,
CompletionCondition completion_condition,
ASIO_MOVE_ARG(WriteHandler) handler,
typename enable_if<
is_dynamic_buffer_sequence<DynamicBufferSequence>::value
is_dynamic_buffer<DynamicBuffer>::value
>::type* = 0);
#if !defined(ASIO_NO_EXTENSIONS)

View File

@ -204,7 +204,7 @@
<member><link linkend="asio.reference.AsyncWriteStream">AsyncWriteStream</link></member>
<member><link linkend="asio.reference.CompletionCondition">CompletionCondition</link></member>
<member><link linkend="asio.reference.ConstBufferSequence">ConstBufferSequence</link></member>
<member><link linkend="asio.reference.DynamicBufferSequence">DynamicBufferSequence</link></member>
<member><link linkend="asio.reference.DynamicBuffer">DynamicBuffer</link></member>
<member><link linkend="asio.reference.MutableBufferSequence">MutableBufferSequence</link></member>
<member><link linkend="asio.reference.ReadHandler">ReadHandler</link></member>
<member><link linkend="asio.reference.SyncRandomAccessReadDevice">SyncRandomAccessReadDevice</link></member>

View File

@ -25,7 +25,7 @@
[include requirements/ConnectCondition.qbk]
[include requirements/ConnectHandler.qbk]
[include requirements/ConstBufferSequence.qbk]
[include requirements/DynamicBufferSequence.qbk]
[include requirements/DynamicBuffer.qbk]
[include requirements/Endpoint.qbk]
[include requirements/EndpointSequence.qbk]
[include requirements/ExecutionContext.qbk]
@ -1374,26 +1374,26 @@ Start an asynchronous operation to read a certain amount of data from a stream.
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload3 async_read]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
ReadHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.async_read.overload3 more...]]``
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read.overload4 async_read]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
ReadHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.async_read.overload4 more...]]``
template<
@ -1601,13 +1601,13 @@ Start an asynchronous operation to read a certain amount of data from a stream.
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
ReadHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@ -1674,15 +1674,15 @@ Start an asynchronous operation to read a certain amount of data from a stream.
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
ReadHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to asynchronously read a certain number of bytes of data from a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@ -2273,45 +2273,45 @@ Start an asynchronous operation to read data into a dynamic buffer sequence, or
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload1 async_read_until]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim,
ReadHandler && handler);
`` [''''&raquo;''' [link asio.reference.async_read_until.overload1 more...]]``
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload2 async_read_until]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim,
ReadHandler && handler);
`` [''''&raquo;''' [link asio.reference.async_read_until.overload2 more...]]``
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload3 async_read_until]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr,
ReadHandler && handler);
`` [''''&raquo;''' [link asio.reference.async_read_until.overload3 more...]]``
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_read_until.overload4 async_read_until]``(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
ReadHandler && handler,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
@ -2378,11 +2378,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim,
ReadHandler && handler);
@ -2482,11 +2482,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim,
ReadHandler && handler);
@ -2586,11 +2586,11 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr,
ReadHandler && handler);
@ -2692,12 +2692,12 @@ Start an asynchronous operation to read data into a dynamic buffer sequence unti
template<
typename ``[link asio.reference.AsyncReadStream AsyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition,
typename ``[link asio.reference.ReadHandler ReadHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_read_until(
AsyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
ReadHandler && handler,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
@ -2729,7 +2729,7 @@ This operation is implemented in terms of zero or more calls to the stream's asy
``
where `iterator` represents the type:
``
buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
buffers_iterator<typename DynamicBuffer::const_buffers_type>
``
The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
@ -3686,26 +3686,26 @@ Start an asynchronous operation to write a certain amount of data to a stream.
template<
typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.WriteHandler WriteHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload3 async_write]``(
AsyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
WriteHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.async_write.overload3 more...]]``
template<
typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
typename ``[link asio.reference.WriteHandler WriteHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` ``[link asio.reference.async_write.overload4 async_write]``(
AsyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
WriteHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.async_write.overload4 more...]]``
template<
@ -3900,13 +3900,13 @@ Start an asynchronous operation to write all of the supplied data to a stream.
template<
typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.WriteHandler WriteHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
AsyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
WriteHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@ -3959,15 +3959,15 @@ Start an asynchronous operation to write a certain amount of data to a stream.
template<
typename ``[link asio.reference.AsyncWriteStream AsyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``,
typename ``[link asio.reference.WriteHandler WriteHandler]``>
``[link asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type ['DEDUCED]]`` async_write(
AsyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
WriteHandler && handler,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to asynchronously write a certain number of bytes of data to a stream. The function call always returns immediately. The asynchronous operation will continue until one of the following conditions is true:
@ -49938,7 +49938,7 @@ Create a new dynamic buffer that represents the given vector.
[section:dynamic_string_buffer dynamic_string_buffer]
Adapt a basic\_string to the DynamicBufferSequence requirements.
Adapt a basic\_string to the DynamicBuffer requirements.
template<
@ -50437,7 +50437,7 @@ Get the size of the input sequence.
[section:dynamic_vector_buffer dynamic_vector_buffer]
Adapt a vector to the DynamicBufferSequence requirements.
Adapt a vector to the DynamicBuffer requirements.
template<
@ -80586,7 +80586,7 @@ Trait to determine whether a type satisfies the ConstBufferSequence requirements
[section:is_dynamic_buffer_sequence is_dynamic_buffer_sequence]
Trait to determine whether a type satisfies the DynamicBufferSequence requirements.
Trait to determine whether a type satisfies the DynamicBuffer requirements.
template<
@ -88554,44 +88554,44 @@ Attempt to read a certain amount of data from a stream before returning.
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read.overload5 read]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
DynamicBuffer && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.read.overload5 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read.overload6 read]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.read.overload6 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t ``[link asio.reference.read.overload7 read]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.read.overload7 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t ``[link asio.reference.read.overload8 read]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.read.overload8 more...]]``
template<
@ -88952,11 +88952,11 @@ Attempt to read a certain amount of data from a stream before returning.
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read(
SyncReadStream & s,
DynamicBufferSequence && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
DynamicBuffer && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@ -89023,12 +89023,12 @@ Attempt to read a certain amount of data from a stream before returning.
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@ -89087,13 +89087,13 @@ Attempt to read a certain amount of data from a stream before returning.
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t read(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@ -89160,14 +89160,14 @@ Attempt to read a certain amount of data from a stream before returning.
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t read(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to read a certain number of bytes of data from a stream. The call will block until one of the following conditions is true:
@ -90179,81 +90179,81 @@ Read data into a dynamic buffer sequence, or into a streambuf, until it contains
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload1 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim);
`` [''''&raquo;''' [link asio.reference.read_until.overload1 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload2 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim,
asio::error_code & ec);
`` [''''&raquo;''' [link asio.reference.read_until.overload2 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename Allocator>
std::size_t ``[link asio.reference.read_until.overload3 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::basic_string< char, std::char_traits< char >, Allocator > & delim);
`` [''''&raquo;''' [link asio.reference.read_until.overload3 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename Allocator>
std::size_t ``[link asio.reference.read_until.overload4 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::basic_string< char, std::char_traits< char >, Allocator > & delim,
asio::error_code & ec);
`` [''''&raquo;''' [link asio.reference.read_until.overload4 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload5 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr);
`` [''''&raquo;''' [link asio.reference.read_until.overload5 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload6 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr,
asio::error_code & ec);
`` [''''&raquo;''' [link asio.reference.read_until.overload6 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition>
std::size_t ``[link asio.reference.read_until.overload7 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.read_until.overload7 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition>
std::size_t ``[link asio.reference.read_until.overload8 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
asio::error_code & ec,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
@ -90341,19 +90341,19 @@ Read data into a dynamic buffer sequence, or into a streambuf, until it contains
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload17 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim);
`` [''''&raquo;''' [link asio.reference.read_until.overload17 more...]]``
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.read_until.overload18 read_until]``(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim,
asio::error_code & ec);
`` [''''&raquo;''' [link asio.reference.read_until.overload18 more...]]``
@ -90373,10 +90373,10 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim);
@ -90468,10 +90468,10 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
char delim,
asio::error_code & ec);
@ -90527,11 +90527,11 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename Allocator>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::basic_string< char, std::char_traits< char >, Allocator > & delim);
@ -90613,11 +90613,11 @@ Read data into a dynamic buffer sequence until it contains a specified delimiter
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename Allocator>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::basic_string< char, std::char_traits< char >, Allocator > & delim,
asio::error_code & ec);
@ -90673,10 +90673,10 @@ Read data into a dynamic buffer sequence until some part of the data it contains
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr);
@ -90768,10 +90768,10 @@ Read data into a dynamic buffer sequence until some part of the data it contains
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const boost::regex & expr,
asio::error_code & ec);
@ -90827,11 +90827,11 @@ Read data into a dynamic buffer sequence until a function object indicates a mat
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
@ -90862,7 +90862,7 @@ This operation is implemented in terms of zero or more calls to the stream's rea
``
where `iterator` represents the type:
``
buffers_iterator<typename DynamicBufferSequence::const_buffers_type>
buffers_iterator<typename DynamicBuffer::const_buffers_type>
``
The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
@ -90960,11 +90960,11 @@ Read data into a dynamic buffer sequence until a function object indicates a mat
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename MatchCondition>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
MatchCondition match_condition,
asio::error_code & ec,
typename enable_if< is_match_condition< MatchCondition >::value >::type * = 0);
@ -90996,7 +90996,7 @@ This operation is implemented in terms of zero or more calls to the stream's rea
``
where `iterator` represents the type:
``
buffers_iterator<DynamicBufferSequence::const_buffers_type>
buffers_iterator<DynamicBuffer::const_buffers_type>
``
The iterator parameters `begin` and `end` define the range of bytes to be scanned to determine whether there is a match. The `first` member of the return value is an iterator marking one-past-the-end of the bytes that have been consumed by the match function. This iterator is used to calculate the `begin` parameter for any subsequent invocation of the match condition. The `second` member of the return value is true if a match has been found, false otherwise.]]
@ -91695,10 +91695,10 @@ The default implementation of the `is_match_condition` type trait evaluates to t
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim);
@ -91713,10 +91713,10 @@ The default implementation of the `is_match_condition` type trait evaluates to t
template<
typename ``[link asio.reference.SyncReadStream SyncReadStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t read_until(
SyncReadStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
const std::string & delim,
asio::error_code & ec);
@ -110565,44 +110565,44 @@ Write a certain amount of data to a stream before returning.
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.write.overload5 write]``(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
DynamicBuffer && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.write.overload5 more...]]``
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t ``[link asio.reference.write.overload6 write]``(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.write.overload6 more...]]``
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t ``[link asio.reference.write.overload7 write]``(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.write.overload7 more...]]``
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t ``[link asio.reference.write.overload8 write]``(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
`` [''''&raquo;''' [link asio.reference.write.overload8 more...]]``
template<
@ -110963,11 +110963,11 @@ Write all of the supplied data to a stream before returning.
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t write(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
DynamicBuffer && buffers,
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@ -111034,12 +111034,12 @@ Write all of the supplied data to a stream before returning.
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``>
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``>
std::size_t write(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@ -111098,13 +111098,13 @@ Write a certain amount of data to a stream before returning.
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t write(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@ -111171,14 +111171,14 @@ Write a certain amount of data to a stream before returning.
template<
typename ``[link asio.reference.SyncWriteStream SyncWriteStream]``,
typename ``[link asio.reference.DynamicBufferSequence DynamicBufferSequence]``,
typename ``[link asio.reference.DynamicBuffer DynamicBuffer]``,
typename ``[link asio.reference.CompletionCondition CompletionCondition]``>
std::size_t write(
SyncWriteStream & s,
DynamicBufferSequence && buffers,
DynamicBuffer && buffers,
CompletionCondition completion_condition,
asio::error_code & ec,
typename enable_if< is_dynamic_buffer_sequence< DynamicBufferSequence >::value >::type * = 0);
typename enable_if< is_dynamic_buffer_sequence< DynamicBuffer >::value >::type * = 0);
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
@ -112270,4 +112270,4 @@ The initiating function (async\_read\_some in the above example) suspends the cu
[endsect]
[endsect]
[endsect]

View File

@ -52,7 +52,7 @@
[include requirements/ConnectCondition.qbk]
[include requirements/ConnectHandler.qbk]
[include requirements/ConstBufferSequence.qbk]
[include requirements/DynamicBufferSequence.qbk]
[include requirements/DynamicBuffer.qbk]
[include requirements/Endpoint.qbk]
[include requirements/EndpointSequence.qbk]
[include requirements/ExecutionContext.qbk]

View File

@ -5,26 +5,24 @@
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/]
[section:DynamicBufferSequence Dynamic buffer sequence requirements]
[section:DynamicBuffer Dynamic buffer requirements]
A dynamic buffer sequence encapsulates memory storage that may be automatically
resized as required, where the memory is divided into an input sequence
followed by an output sequence. These memory regions are internal to the
dynamic buffer sequence, but direct access to the elements is provided to
permit them to be efficiently used with I/O operations, such as the `send` or
`receive` operations of a socket. Data written to the output sequence of a
dynamic buffer sequence object is appended to the input sequence of the same
object.
A dynamic buffer encapsulates memory storage that may be automatically resized
as required, where the memory is divided into an input sequence followed by an
output sequence. These memory regions are internal to the dynamic buffer
sequence, but direct access to the elements is provided to permit them to be
efficiently used with I/O operations, such as the `send` or `receive`
operations of a socket. Data written to the output sequence of a dynamic buffer
sequence object is appended to the input sequence of the same object.
A dynamic buffer sequence type `X` shall satisfy the requirements of
`MoveConstructible` (C++ Std, [moveconstructible]) types in addition to those
listed below.
A dynamic buffer type `X` shall satisfy the requirements of `MoveConstructible`
(C++ Std, [moveconstructible]) types in addition to those listed below.
In the table below, `X` denotes a dynamic buffer sequence class, `x` denotes a
In the table below, `X` denotes a dynamic buffer class, `x` denotes a
value of type `X&`, `x1` denotes values of type `const X&`, and `n` denotes a
value of type `size_t`, and `u` denotes an identifier.
[table DynamicBufferSequence requirements
[table DynamicBuffer requirements
[[expression] [type] [assertion/note\npre/post-conditions]]
[
[`X::const_buffers_type`]
@ -53,8 +51,7 @@ value of type `size_t`, and `u` denotes an identifier.
[`x1.capacity()`]
[`size_t`]
[Returns the maximum sum of the sizes of the input sequence and output
sequence that the dynamic buffer sequence can hold without requiring
reallocation.]
sequence that the dynamic buffer can hold without requiring reallocation.]
]
[
[`x1.data()`]
@ -68,9 +65,9 @@ value of type `size_t`, and `u` denotes an identifier.
[Requires: `size() + n <= max_size()`.\n
\n
Returns a mutable buffer sequence `u` representing the output sequence, and
where `buffer_size(u) == n`. The dynamic buffer sequence reallocates
memory as required. All constant or mutable buffer sequences previously
obtained using `data()` or `prepare()` are invalidated.\n
where `buffer_size(u) == n`. The dynamic buffer reallocates memory as
required. All constant or mutable buffer sequences previously obtained
using `data()` or `prepare()` are invalidated.\n
\n
Throws: `length_error` if `size() + n > max_size()`.]
]