#ifndef __BETACORE_SERVER_HPP__ #define __BETACORE_SERVER_HPP__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "common.hpp" namespace betacore { class Server { private: fd_set rset; bool online = false; bool server_running= false; int port; int server_socket; std::vector clients; struct sockaddr_in server_address; void start(); void shutdown(); void listener(); void read_socket(int client); public: Server(int port); void off(); bool running(); }; } // namespace betacore #endif