Telnet++ 4.0.0.9
A C++ library for interacting with Telnet streams
Loading...
Searching...
No Matches
for_each_request.hpp
1#pragma once
2
3#include "telnetpp/core.hpp"
4#include "telnetpp/options/new_environ/detail/request_parser_helper.hpp"
5
6#include <algorithm>
7
8namespace telnetpp::options::new_environ::detail {
9
10template <typename Continuation>
11constexpr void for_each_request(telnetpp::bytes requests, Continuation &&cont)
12{
13 request_parsing_state state;
14
15 std::ranges::for_each(requests, [&](telnetpp::byte byte) {
16 parse_request_byte(state, byte, cont);
17 });
18 parse_request_end(state, cont);
19}
20
21} // namespace telnetpp::options::new_environ::detail