Add complib client and TCP communication
This commit is contained in:
parent
1a033c8b03
commit
a484bc2137
35 changed files with 815 additions and 232 deletions
20
server_v2/include/communication/TCPSocketServer.hpp
Normal file
20
server_v2/include/communication/TCPSocketServer.hpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef COMPLIB_SERVER_TCPSOCKETSERVER_HPP
|
||||
#define COMPLIB_SERVER_TCPSOCKETSERVER_HPP
|
||||
|
||||
#include <thread>
|
||||
|
||||
#define SOCKET_PATH "/tmp/compLib"
|
||||
#define SOCKET_BUFFER_SIZE 128
|
||||
|
||||
class TCPSocketServer {
|
||||
public:
|
||||
TCPSocketServer();
|
||||
|
||||
private:
|
||||
[[noreturn]] void server_loop();
|
||||
|
||||
std::thread server_thread;
|
||||
};
|
||||
|
||||
|
||||
#endif //COMPLIB_SERVER_TCPSOCKETSERVER_HPP
|
Reference in a new issue