Resolve Adhoc Server DNS early and cache it so we don't need to resolve it again later.

This commit is contained in:
ANR2ME 2020-09-10 11:22:39 +07:00
parent 2affbb850c
commit 82a064adcf
3 changed files with 34 additions and 30 deletions

View file

@ -158,6 +158,11 @@ void __NetInit() {
isOriPort = g_Config.bEnableUPnP && g_Config.bUPnPUseOriginalPort;
minSocketTimeoutUS = g_Config.iMinTimeout * 1000UL;
// Init Default AdhocServer struct
g_adhocServerIP.in.sin_family = AF_INET;
g_adhocServerIP.in.sin_port = htons(SERVER_PORT); //27312 // Maybe read this from config too
g_adhocServerIP.in.sin_addr.s_addr = INADDR_NONE;
InitLocalhostIP();
SceNetEtherAddr mac;