11 #ifndef ASIO_READ_UNTIL_HPP 12 #define ASIO_READ_UNTIL_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 21 #include "asio/async_result.hpp" 22 #include "asio/buffer.hpp" 23 #include "asio/detail/regex_fwd.hpp" 24 #include "asio/detail/string_view.hpp" 25 #include "asio/detail/type_traits.hpp" 26 #include "asio/error.hpp" 28 #if !defined(ASIO_NO_EXTENSIONS) 29 # include "asio/basic_streambuf_fwd.hpp" 30 #endif // !defined(ASIO_NO_EXTENSIONS) 32 #include "asio/detail/push_options.hpp" 38 char (&has_result_type_helper(...))[2];
41 char has_result_type_helper(T*,
typename T::result_type* = 0);
46 enum { value = (
sizeof((has_result_type_helper)((T*)(0))) == 1) };
55 #if defined(GENERATING_DOCUMENTATION) 56 static const bool value;
61 value = asio::is_function<
62 typename asio::remove_pointer<T>::type>::value
78 #if !defined(ASIO_NO_DYNAMIC_BUFFER_V1) 133 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
135 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
char delim,
175 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
177 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
235 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
237 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
238 ASIO_STRING_VIEW_PARAM delim,
278 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
280 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
281 ASIO_STRING_VIEW_PARAM delim,
288 #if !defined(ASIO_NO_EXTENSIONS) 289 #if defined(ASIO_HAS_BOOST_REGEX) \ 290 || defined(GENERATING_DOCUMENTATION) 346 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
348 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
349 const boost::regex& expr,
391 template <
typename SyncReadStream,
typename DynamicBuffer_v1>
393 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
400 #endif // defined(ASIO_HAS_BOOST_REGEX) 505 template <
typename SyncReadStream,
506 typename DynamicBuffer_v1,
typename MatchCondition>
508 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
509 MatchCondition match_condition,
569 template <
typename SyncReadStream,
570 typename DynamicBuffer_v1,
typename MatchCondition>
572 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
580 #if !defined(ASIO_NO_IOSTREAM) 630 template <
typename SyncReadStream,
typename Allocator>
664 template <
typename SyncReadStream,
typename Allocator>
717 template <
typename SyncReadStream,
typename Allocator>
720 ASIO_STRING_VIEW_PARAM delim);
752 template <
typename SyncReadStream,
typename Allocator>
757 #if defined(ASIO_HAS_BOOST_REGEX) \ 758 || defined(GENERATING_DOCUMENTATION) 810 template <
typename SyncReadStream,
typename Allocator>
847 template <
typename SyncReadStream,
typename Allocator>
852 #endif // defined(ASIO_HAS_BOOST_REGEX) 955 template <
typename SyncReadStream,
typename Allocator,
typename MatchCondition>
1011 template <
typename SyncReadStream,
typename Allocator,
typename MatchCondition>
1017 #endif // !defined(ASIO_NO_IOSTREAM) 1018 #endif // !defined(ASIO_NO_EXTENSIONS) 1019 #endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1) 1074 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1075 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
char delim,
1114 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1115 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1172 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1173 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1174 ASIO_STRING_VIEW_PARAM delim,
1213 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1214 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1220 #if !defined(ASIO_NO_EXTENSIONS) 1221 #if defined(ASIO_HAS_BOOST_REGEX) \ 1222 || defined(GENERATING_DOCUMENTATION) 1278 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1279 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1280 const boost::regex& expr,
1321 template <
typename SyncReadStream,
typename DynamicBuffer_v2>
1322 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1328 #endif // defined(ASIO_HAS_BOOST_REGEX) 1433 template <
typename SyncReadStream,
1434 typename DynamicBuffer_v2,
typename MatchCondition>
1435 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1436 MatchCondition match_condition,
1495 template <
typename SyncReadStream,
1496 typename DynamicBuffer_v2,
typename MatchCondition>
1497 std::size_t
read_until(SyncReadStream& s, DynamicBuffer_v2 buffers,
1504 #endif // !defined(ASIO_NO_EXTENSIONS) 1517 #if !defined(ASIO_NO_DYNAMIC_BUFFER_V1) 1601 template <
typename AsyncReadStream,
typename DynamicBuffer_v1,
1603 std::size_t)) ReadHandler
1604 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
1605 typename AsyncReadStream::executor_type)>
1608 async_read_until(AsyncReadStream& s,
1609 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
char delim,
1610 ASIO_MOVE_ARG(ReadHandler) handler
1611 ASIO_DEFAULT_COMPLETION_TOKEN(
1612 typename AsyncReadStream::executor_type),
1700 template <
typename AsyncReadStream,
typename DynamicBuffer_v1,
1702 std::size_t)) ReadHandler
1703 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
1704 typename AsyncReadStream::executor_type)>
1707 async_read_until(AsyncReadStream& s,
1708 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1709 ASIO_STRING_VIEW_PARAM delim,
1710 ASIO_MOVE_ARG(ReadHandler) handler
1711 ASIO_DEFAULT_COMPLETION_TOKEN(
1712 typename AsyncReadStream::executor_type),
1718 #if !defined(ASIO_NO_EXTENSIONS) 1719 #if defined(ASIO_HAS_BOOST_REGEX) \ 1720 || defined(GENERATING_DOCUMENTATION) 1807 template <
typename AsyncReadStream,
typename DynamicBuffer_v1,
1809 std::size_t)) ReadHandler
1810 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
1811 typename AsyncReadStream::executor_type)>
1814 async_read_until(AsyncReadStream& s,
1815 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1816 const boost::regex& expr,
1817 ASIO_MOVE_ARG(ReadHandler) handler
1818 ASIO_DEFAULT_COMPLETION_TOKEN(
1819 typename AsyncReadStream::executor_type),
1825 #endif // defined(ASIO_HAS_BOOST_REGEX) 1956 template <
typename AsyncReadStream,
1957 typename DynamicBuffer_v1,
typename MatchCondition,
1959 std::size_t)) ReadHandler
1960 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
1961 typename AsyncReadStream::executor_type)>
1964 async_read_until(AsyncReadStream& s,
1965 ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
1966 MatchCondition match_condition,
1967 ASIO_MOVE_ARG(ReadHandler) handler
1968 ASIO_DEFAULT_COMPLETION_TOKEN(
1969 typename AsyncReadStream::executor_type),
1976 #if !defined(ASIO_NO_IOSTREAM) 2056 template <
typename AsyncReadStream,
typename Allocator,
2058 std::size_t)) ReadHandler
2059 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2060 typename AsyncReadStream::executor_type)>
2063 async_read_until(AsyncReadStream& s,
2065 ASIO_MOVE_ARG(ReadHandler) handler
2066 ASIO_DEFAULT_COMPLETION_TOKEN(
2067 typename AsyncReadStream::executor_type));
2147 template <
typename AsyncReadStream,
typename Allocator,
2149 std::size_t)) ReadHandler
2150 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2151 typename AsyncReadStream::executor_type)>
2154 async_read_until(AsyncReadStream& s,
2156 ASIO_STRING_VIEW_PARAM delim,
2157 ASIO_MOVE_ARG(ReadHandler) handler
2158 ASIO_DEFAULT_COMPLETION_TOKEN(
2159 typename AsyncReadStream::executor_type));
2161 #if defined(ASIO_HAS_BOOST_REGEX) \ 2162 || defined(GENERATING_DOCUMENTATION) 2246 template <
typename AsyncReadStream,
typename Allocator,
2248 std::size_t)) ReadHandler
2249 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2250 typename AsyncReadStream::executor_type)>
2253 async_read_until(AsyncReadStream& s,
2255 ASIO_MOVE_ARG(ReadHandler) handler
2256 ASIO_DEFAULT_COMPLETION_TOKEN(
2257 typename AsyncReadStream::executor_type));
2259 #endif // defined(ASIO_HAS_BOOST_REGEX) 2385 template <
typename AsyncReadStream,
typename Allocator,
typename MatchCondition,
2387 std::size_t)) ReadHandler
2388 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2389 typename AsyncReadStream::executor_type)>
2392 async_read_until(AsyncReadStream& s,
2394 MatchCondition match_condition,
2395 ASIO_MOVE_ARG(ReadHandler) handler
2396 ASIO_DEFAULT_COMPLETION_TOKEN(
2397 typename AsyncReadStream::executor_type),
2400 #endif // !defined(ASIO_NO_IOSTREAM) 2401 #endif // !defined(ASIO_NO_EXTENSIONS) 2402 #endif // !defined(ASIO_NO_DYNAMIC_BUFFER_V1) 2486 template <
typename AsyncReadStream,
typename DynamicBuffer_v2,
2488 std::size_t)) ReadHandler
2489 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2490 typename AsyncReadStream::executor_type)>
2493 async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
char delim,
2494 ASIO_MOVE_ARG(ReadHandler) handler
2495 ASIO_DEFAULT_COMPLETION_TOKEN(
2496 typename AsyncReadStream::executor_type),
2583 template <
typename AsyncReadStream,
typename DynamicBuffer_v2,
2585 std::size_t)) ReadHandler
2586 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2587 typename AsyncReadStream::executor_type)>
2590 async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
2591 ASIO_STRING_VIEW_PARAM delim,
2592 ASIO_MOVE_ARG(ReadHandler) handler
2593 ASIO_DEFAULT_COMPLETION_TOKEN(
2594 typename AsyncReadStream::executor_type),
2599 #if !defined(ASIO_NO_EXTENSIONS) 2600 #if defined(ASIO_HAS_BOOST_REGEX) \ 2601 || defined(GENERATING_DOCUMENTATION) 2688 template <
typename AsyncReadStream,
typename DynamicBuffer_v2,
2690 std::size_t)) ReadHandler
2691 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2692 typename AsyncReadStream::executor_type)>
2695 async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
2696 const boost::regex& expr,
2697 ASIO_MOVE_ARG(ReadHandler) handler
2698 ASIO_DEFAULT_COMPLETION_TOKEN(
2699 typename AsyncReadStream::executor_type),
2704 #endif // defined(ASIO_HAS_BOOST_REGEX) 2835 template <
typename AsyncReadStream,
2836 typename DynamicBuffer_v2,
typename MatchCondition,
2838 std::size_t)) ReadHandler
2839 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
2840 typename AsyncReadStream::executor_type)>
2843 async_read_until(AsyncReadStream& s, DynamicBuffer_v2 buffers,
2844 MatchCondition match_condition,
2845 ASIO_MOVE_ARG(ReadHandler) handler
2846 ASIO_DEFAULT_COMPLETION_TOKEN(
2847 typename AsyncReadStream::executor_type),
2853 #endif // !defined(ASIO_NO_EXTENSIONS) 2859 #include "asio/detail/pop_options.hpp" 2861 #include "asio/impl/read_until.hpp" 2863 #endif // ASIO_READ_UNTIL_HPP Type trait used to determine whether a type can be used as a match condition function with read_until...
Definition: read_until.hpp:53
Definition: blocking.hpp:208
Definition: type_traits.hpp:97
Definition: read_until.hpp:44
Class to represent an error code value.
Definition: error_code.hpp:80
std::size_t read_until(SyncReadStream &s, DynamicBuffer_v2 buffers, MatchCondition match_condition, asio::error_code &ec, typename enable_if< is_match_condition< MatchCondition >::value &&is_dynamic_buffer_v2< DynamicBuffer_v2 >::value >::type *)
Read data into a dynamic buffer sequence until a function object indicates a match.
Definition: read_until.hpp:715
Trait to determine whether a type satisfies the DynamicBuffer_v2 requirements.
Definition: buffer.hpp:2464
Automatically resizable buffer class based on std::streambuf.
Definition: basic_streambuf.hpp:110
char ASIO_MOVE_ARG(ReadHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(typename AsyncReadStream ASIO_STRING_VIEW_PARAM ASIO_MOVE_ARG(ReadHandler) handler ASIO_DEFAULT_COMPLETION_TOKEN(typename AsyncReadStream ASIO_INITFN_AUTO_RESULT_TYPE(ReadHandler, void(asio::error_code, std::size_t)) async_read_until(AsyncReadStream &s
Start an asynchronous operation to read data into a dynamic buffer sequence until a function object i...
Definition: any_io_executor.hpp:28
Trait to determine whether a type satisfies the DynamicBuffer_v1 requirements.
Definition: buffer.hpp:2451