Realistic 3D camera system
3D camera system components
Functions
Completion Condition Function Objects

Functions

detail::transfer_all_t asio::transfer_all ()
 
detail::transfer_at_least_t asio::transfer_at_least (std::size_t minimum)
 
detail::transfer_exactly_t asio::transfer_exactly (std::size_t size)
 

Detailed Description

Function objects used for determining when a read or write operation should complete.

Function Documentation

detail::transfer_all_t asio::transfer_all ( )
inline

Return a completion condition function object that indicates that a read or write operation should continue until all of the data has been transferred, or until an error occurs. This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.

Example
Reading until a buffer is full:
std::size_t n = asio::read(
sock, asio::buffer(buf),
if (ec)
{
// An error occurred.
}
else
{
// n == 128
}

Definition at line 138 of file completion_condition.hpp.

detail::transfer_at_least_t asio::transfer_at_least ( std::size_t  minimum)
inline

Return a completion condition function object that indicates that a read or write operation should continue until a minimum number of bytes has been transferred, or until an error occurs. This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.

Example
Reading until a buffer is full or contains at least 64 bytes:
std::size_t n = asio::read(
sock, asio::buffer(buf),
if (ec)
{
// An error occurred.
}
else
{
// n >= 64 && n <= 128
}

Definition at line 172 of file completion_condition.hpp.

detail::transfer_exactly_t asio::transfer_exactly ( std::size_t  size)
inline

Return a completion condition function object that indicates that a read or write operation should continue until an exact number of bytes has been transferred, or until an error occurs. This function is used to create an object, of unspecified type, that meets CompletionCondition requirements.

Example
Reading until a buffer is full or contains exactly 64 bytes:
std::size_t n = asio::read(
sock, asio::buffer(buf),
if (ec)
{
// An error occurred.
}
else
{
// n == 64
}

Definition at line 206 of file completion_condition.hpp.