35 : server_(port), script_thread_(), program_(program)
66 const uint8_t* data =
reinterpret_cast<const uint8_t*
>(
program_.c_str());
void setDisconnectCallback(std::function< void(const int)> func)
This callback will be triggered on clients disconnecting from the server.
#define URCL_LOG_ERROR(...)
void disconnectionCallback(const int filedescriptor)
const std::string PROGRAM_REQUEST_
void setConnectCallback(std::function< void(const int)> func)
This callback will be triggered on clients connecting to the server.
void start()
Start event handling.
void messageCallback(const int filedescriptor, char *buffer)
void connectionCallback(const int filedescriptor)
#define URCL_LOG_DEBUG(...)
void sendProgram(const int filedescriptor)
bool write(const int fd, const uint8_t *buf, const size_t buf_len, size_t &written)
Writes to a client.
void setMessageCallback(std::function< void(const int, char *, int)> func)
This callback will be triggered on messages received on the socket.
#define URCL_LOG_INFO(...)