Chops Net IP
Loading...
Searching...
No Matches
monitor_connector.hpp
Go to the documentation of this file.
1
16#ifndef MONITOR_CONNECTOR_HPP_INCLUDED
17#define MONITOR_CONNECTOR_HPP_INCLUDED
18
19#include <string>
20#include <string_view>
21#include <cstddef> // std::size_t
22#include <future>
23#include <utility> // std::move
24#include <type_traits> // std::is_same
25
26#include "asio/ip/basic_endpoint.hpp"
27
28#include "net_ip/net_ip.hpp"
29#include "net_ip/net_entity.hpp"
31
33
34namespace chops {
35namespace test {
36
37// shutdown message from monitor process will set promise, which causes future to pop, which
38// tells DSR to shutdown
40public:
41
43 std::string_view monitor_port, std::string_view monitor_host,
44 std::promise<void> prom,
45 chops::net::err_wait_q& err_wq) :
46 m_monitor(), m_io_output(), m_prom(std::move(prom))
47 {
48 // make_tcp_connector, start, provide state chg func obj that does start_io,
49 // providing msg handler for shutdown, make_err_func_with_wait_queue for error display
50 }
51 void send_monitor_msg (const monitor_msg_data& msg_data) const {
52
53 }
54 // temporary - used for testing DSR
55 void shutdown() {
56 // send shutdown msg
57 m_prom.set_value();
58 }
59
60private:
61 chops::net::net_entity m_monitor;
62 chops::net::tcp_io_output m_io_output;
63 std::promise<void> m_prom;
64 // more member data to fill in
65
66};
67
68}
69}
70#endif
71
The net_entity class provides the primary application interface into the TCP acceptor,...
Definition net_entity.hpp:82
Primary class for the Chops Net IP library and the initial API point for providing TCP acceptor,...
Definition net_ip.hpp:122
Definition monitor_connector.hpp:39
Functions and classes for error callback handling and basic logging.
chops::wait_queue< error_data > err_wait_q
wait_queue declaration that provides error data.
Definition error_delivery.hpp:60
Data structures sent between nodes in test data blaster.
net_entity class and related functionality.
Definition monitor_msg.hpp:37