From 655368241fc835fae5d0fcefaf42fe168f2c328d Mon Sep 17 00:00:00 2001 From: Jack Garrard Date: Tue, 25 Oct 2022 18:07:26 -0700 Subject: [PATCH] Made default port be a higher port --- source/server/SocketClient.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/server/SocketClient.cpp b/source/server/SocketClient.cpp index 5a5f51c..f34633d 100644 --- a/source/server/SocketClient.cpp +++ b/source/server/SocketClient.cpp @@ -87,8 +87,9 @@ nn::Result SocketClient::init(const char* ip, u16 port) { return -1; } + // TODO Find a way around the 41553 constant port udpAddress.address = hostAddress; - udpAddress.port = nn::socket::InetHtons(0); + udpAddress.port = nn::socket::InetHtons(41553); udpAddress.family = 2; this->udp_addr = udpAddress; this->has_recv_udp = false; @@ -156,7 +157,7 @@ s32 SocketClient::setPeerUdpPort(u16 port) { } const char* SocketClient::getUdpStateChar() { - if (this->udp_addr.port == 0) { + if (this->udp_addr.port == 41553) { return "Waiting for handshake"; }