Reference | Class Hierarchy | Class Index | Member Index |
Functions | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, char delim) |
Read data into a streambuf until a delimiter is encountered. | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, char delim, asio::error_code &ec) |
Read data into a streambuf until a delimiter is encountered. | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, const std::string &delim) |
Read data into a streambuf until a delimiter is encountered. | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, const std::string &delim, asio::error_code &ec) |
Read data into a streambuf until a delimiter is encountered. | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, const boost::regex &expr) |
Read data into a streambuf until a regular expression is located. | |
template<typename SyncReadStream, typename Allocator> | |
std::size_t | asio::read_until (SyncReadStream &s, asio::basic_streambuf< Allocator > &b, const boost::regex &expr, asio::error_code &ec) |
Read data into a streambuf until a regular expression is located. |
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
char | delim | |||
) |
Read data into a streambuf until a delimiter is encountered.
This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
delim | The delimiter character. |
asio::system_error | Thrown on failure. |
asio::streambuf b; asio::read_until(s, b, '\n'); std::istream is(&b); std::string line; std::getline(is, line);
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
char | delim, | |||
asio::error_code & | ec | |||
) |
Read data into a streambuf until a delimiter is encountered.
This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
delim | The delimiter character. | |
ec | Set to indicate what error occurred, if any. |
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
const std::string & | delim | |||
) |
Read data into a streambuf until a delimiter is encountered.
This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
delim | The delimiter string. |
asio::system_error | Thrown on failure. |
asio::streambuf b; asio::read_until(s, b, "\r\n"); std::istream is(&b); std::string line; std::getline(is, line);
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
const std::string & | delim, | |||
asio::error_code & | ec | |||
) |
Read data into a streambuf until a delimiter is encountered.
This function is used to read data into the specified streambuf until the streambuf's get area contains the specified delimiter. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
delim | The delimiter string. | |
ec | Set to indicate what error occurred, if any. |
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
const boost::regex & | expr | |||
) |
Read data into a streambuf until a regular expression is located.
This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
expr | The regular expression. |
asio::system_error | Thrown on failure. |
asio::streambuf b; asio::read_until(s, b, boost::regex("\r\n")); std::istream is(&b); std::string line; std::getline(is, line);
std::size_t asio::read_until | ( | SyncReadStream & | s, | |
asio::basic_streambuf< Allocator > & | b, | |||
const boost::regex & | expr, | |||
asio::error_code & | ec | |||
) |
Read data into a streambuf until a regular expression is located.
This function is used to read data into the specified streambuf until the streambuf's get area contains some data that matches a regular expression. The call will block until one of the following conditions is true:
s | The stream from which the data is to be read. The type must support the SyncReadStream concept. | |
b | A streambuf object into which the data will be read. | |
expr | The regular expression. | |
ec | Set to indicate what error occurred, if any. |