Choose hostname and port (for server and client part)

This commit is contained in:
2025-04-30 15:14:10 +03:00
parent cc1bb79633
commit 3b84aa7740
6 changed files with 88 additions and 45 deletions

View File

@@ -6,16 +6,15 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
const int PORT = 8080;
#include <netdb.h>
class Client{
private:
int sock;
public:
Client() : sock(0){};
void run();
Client();
void run(const std::string& h = "localhost", const unsigned short p = 1024u);
int ping(struct sockaddr_in);
void game();
};
#endif