Thunderbots Project
Loading...
Searching...
No Matches
unix_sender.h
1#pragma once
2
3#include <boost/asio.hpp>
4#include <boost/bind.hpp>
5#include <string>
6#include <type_traits>
7
9{
10 public:
17 UnixSender(boost::asio::io_service& io_service, const std::string& unix_socket_path);
18
20
26 void sendString(const std::string& message);
27
28 private:
29 // A unix socket to send data over
30 boost::asio::local::datagram_protocol::socket socket_;
31
32 // The endpoint for the receiver
33 boost::asio::local::datagram_protocol::endpoint receiver_endpoint_;
34 std::string unix_socket_path_;
35
36 // Failed to send log throttling
37 const unsigned MAX_SEND_FAILURES_BEFORE_LOG = 100;
38 unsigned log_counter = 0;
39};
Definition unix_sender.h:9
void sendString(const std::string &message)
Definition unix_sender.cpp:21