поменял название зависимости
This commit is contained in:
24
dependencies/control_system/client/sock_client.h
vendored
Normal file
24
dependencies/control_system/client/sock_client.h
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include "../common/seq_packet.h"
|
||||
|
||||
class client
|
||||
{
|
||||
public:
|
||||
client(boost::asio::io_context & io_context, const std::string & unix_file, std::function<void(const std::vector<uint8_t>&)> func_cb = nullptr);
|
||||
~client();
|
||||
|
||||
void write(const std::vector<uint8_t> & data);
|
||||
void do_close();
|
||||
|
||||
private:
|
||||
client(const client&) = delete;
|
||||
const client& operator=(const client&) = delete;
|
||||
|
||||
seq_packet::seqpacket_protocol::socket socket_;
|
||||
std::array<uint8_t, 2000> data_;
|
||||
std::function<void(const std::vector<uint8_t>&)> callback_func;
|
||||
|
||||
void handle_connect(const boost::system::error_code & error);
|
||||
void handle_read(const boost::system::error_code & error, size_t bytes_transferred);
|
||||
void start();
|
||||
};
|
Reference in New Issue
Block a user