Chops Net IP
Loading...
Searching...
No Matches
monitor_msg.hpp
Go to the documentation of this file.
1
16#ifndef MONITOR_MSG_HPP_INCLUDED
17#define MONITOR_MSG_HPP_INCLUDED
18
19#include <string>
20#include <string_view>
21
22#include "net_ip/net_ip.hpp"
23#include "net_ip/net_entity.hpp"
25
26#include "asio/ip/basic_endpoint.hpp"
27
28namespace chops {
29namespace test {
30
31
32template <typename AsioIpProtocol>
33std::string format_addr (const asio::ip::basic_endpoint<AsioIpProtocol>& endpoint) {
34 return endpoint.address().to_string() + ":" + std::to_string(endpoint.port());
35}
36
38
39 static constexpr std::size_t max_msg_data_to_capture = 15;
40 enum msg_direction { incoming, outgoing };
41
42 std::string m_dsr_name;
43 std::string m_protocol; // "tcp" or "udp"
44 std::string m_remote_addr; // in "host:port" format, see format_addr above
45 msg_direction m_direction;
46 std::size_t m_curr_msg_num;
47 std::size_t m_curr_msg_size;
48 std::string m_curr_msg_beginning; // up to max_msg_data_to_capture chars
49 std::size_t m_total_msgs_to_send; // 0 if direction is incoming, since total not known in advance
50 std::size_t m_outgoing_queue_size;
51
52};
53
55// to be filled in
56};
57
58
59/*
60inline chops::const_shared_buffer serialize_monitor_msg_data (const monitor_msg_data& msg_data) {
61 // work in progress
62 return null;
63}
64
65inline monitor_msg_data deserialize_monitor_msg_data (const chops::const_shared_buffer& buf) {
66 // work in progress
67 return null;
68}
69
70inline chops::const_shared_buffer serialize_shutdown_message() {
71 // work in progress
72 return null;
73}
74
75inline std::string deserialize_shutdown_message() {
76 // work in progress
77 return null;
78}
79*/
80
81
82}
83}
84#endif
85
Functions and classes for error callback handling and basic logging.
net_entity class and related functionality.
Definition monitor_msg.hpp:37
Definition monitor_msg.hpp:54