/* * ===================================================================================== * * Filename: tcp_proxy.h * * Description: * * Version: 1.0 * Created: 2021年05月19日 15时04分55秒 * Revision: none * Compiler: gcc * * Author: Li Chao (), lichao@aiotlink.com * Organization: * * ===================================================================================== */ #ifndef TCP_PROXY_E1YJ92U5 #define TCP_PROXY_E1YJ92U5 #include "shm.h" #include "tcp_common.h" #include #include class ShmSocket; class TcpProxy { public: TcpProxy(); ~TcpProxy(); bool Start(bhome_shm::SharedMemory &shm); void Stop(); private: bool Send(const std::string &ip, int port, std::string &&content); std::unique_ptr local_; boost::asio::io_context io_context_; std::thread worker_; std::atomic run_; }; #endif // end of include guard: TCP_PROXY_E1YJ92U5