Removing TCPNoDelay option from Networking Settings and always enable it to improve response time.

This commit is contained in:
ANR2ME committed 2021-03-01 01:45:28 +07:00
1 parent 36a9fb7645
commit 620e003c10
3 files changed
+4 -8

No files matched your search

+1 -1
View File
@@ -968,7 +968,7 @@ static ConfigSetting networkSettings[] = {
ConfigSetting("proAdhocServer", &g_Config.proAdhocServer, "myneighborsushicat.com", true, true),
ConfigSetting("PortOffset", &g_Config.iPortOffset, 0, true, true),
ConfigSetting("MinTimeout", &g_Config.iMinTimeout, 0, true, true),
ConfigSetting("TCPNoDelay", &g_Config.bTCPNoDelay, false, true, true),
ConfigSetting("TCPNoDelay", &g_Config.bTCPNoDelay, true, true, true),
ConfigSetting("ForcedFirstConnect", &g_Config.bForcedFirstConnect, false, true, true),
ConfigSetting("EnableUPnP", &g_Config.bEnableUPnP, false, true, true),
ConfigSetting("UPnPUseOriginalPort", &g_Config.bUPnPUseOriginalPort, false, true, true),
+3 -6
View File
@@ -3148,8 +3148,7 @@ static int sceNetAdhocPtpOpen(const char *srcmac, int sport, const char *dstmac,
setSockTimeout(tcpsocket, SO_SNDTIMEO, rexmt_int);
// Disable Nagle Algo to send immediately. Or may be we shouldn't disable Nagle since there is PtpFlush function?
if (g_Config.bTCPNoDelay)
setSockNoDelay(tcpsocket, 1);
setSockNoDelay(tcpsocket, 1);
// Binding Information for local Port
struct sockaddr_in addr;
@@ -3267,8 +3266,7 @@ int AcceptPtpSocket(int ptpId, int newsocket, sockaddr_in& peeraddr, SceNetEther
setSockReuseAddrPort(newsocket);
// Disable Nagle Algo to send immediately. Or may be we shouldn't disable Nagle since there is PtpFlush function?
if (g_Config.bTCPNoDelay)
setSockNoDelay(newsocket, 1);
setSockNoDelay(newsocket, 1);
// Local Address Information
struct sockaddr_in local;
@@ -3713,8 +3711,7 @@ static int sceNetAdhocPtpListen(const char *srcmac, int sport, int bufsize, int
setSockTimeout(tcpsocket, SO_RCVTIMEO, rexmt_int);
// Disable Nagle Algo to send immediately. Or may be we shouldn't disable Nagle since there is PtpFlush function?
if (g_Config.bTCPNoDelay)
setSockNoDelay(tcpsocket, 1);
setSockNoDelay(tcpsocket, 1);
// Binding Information for local Port
struct sockaddr_in addr;
-1
View File
@@ -835,7 +835,6 @@ void GameSettingsScreen::CreateViews() {
networkingSettings->Add(new ItemHeader(n->T("Misc", "Misc (default = compatibility)")));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iPortOffset, 0, 60000, n->T("Port offset", "Port offset (0 = PSP compatibility)"), 100, screenManager()));
networkingSettings->Add(new PopupSliderChoice(&g_Config.iMinTimeout, 0, 15000, n->T("Minimum Timeout", "Minimum Timeout (override in ms, 0 = default)"), 50, screenManager()));
networkingSettings->Add(new CheckBox(&g_Config.bTCPNoDelay, n->T("TCP No Delay", "TCP No Delay (faster TCP)")));
networkingSettings->Add(new CheckBox(&g_Config.bForcedFirstConnect, n->T("Forced First Connect", "Forced First Connect (faster Connect)")));
ViewGroup *toolsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));