#pragma once #include #include #include #include "client.hpp" //since this will be running on our vps we dont need string encryption or protection for anything //which is cool, i guess namespace server { class c_server { std::mutex m_mutex; // vectors are NOT thread safe. std::vector< std::shared_ptr< c_client > > m_clients; WSADATA m_sock_data{ }; SOCKET m_socket{ }; public: ~c_server( ) { if( m_socket ) closesocket( m_socket ); } int init( ); void listen( ); void client_loop( ); }; } extern server::c_server g_server;