Telnet++  3.1.0.2
A C++ library for interacting with Telnet streams
for_each_response.hpp
1 #pragma once
2 
3 #include "telnetpp/options/new_environ/detail/response_parser_helper.hpp"
4 
5 namespace telnetpp::options::new_environ::detail {
6 
7 template <typename Continuation>
8 void for_each_response(telnetpp::bytes content, Continuation &&cont)
9 {
10  parsing_state state;
11 
12  auto const *current = content.begin();
13  auto const *end = content.end();
14 
15  while (current != end)
16  {
17  parse_byte(current++, state, cont);
18  }
19 
20  parse_end(state, cont);
21 }
22 
23 } // namespace telnetpp::options::new_environ::detail