Rudimentary support for IPv6 in server socket creation

I haven't completely implemented it yet, but I did come up with a basic algorithm
to convert the IPv6 address into a 'code' form. I still have to write the code to
actually create the socket, though.
This commit is contained in:
2024-03-09 19:32:45 -05:00
parent 8758060bfb
commit 52f8034f4e
2 changed files with 68 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ GameType check_server(char* ip_text, char* port_text) {
std::string code = connect_code::encode(addr, std::to_string(port));
/* Create server socket and wait for client to connect */
Server* server = new Server(4, ES_UDP, addr.data(), port);
Server* server = new Server(check_ip_ver(addr.data()), ES_UDP, addr.data(), port);
server->create_socket();
display_text_centered("Your code is " + code + "\nWaiting for connection...");
std::string response = "";