1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-02-20 01:20:09 +03:00

Add server-side NOOP upload for connection keepalive

This commit is contained in:
Siddharth Narayan
2025-12-21 21:10:32 -05:00
parent 304364719c
commit c32184495b
4 changed files with 48 additions and 3 deletions

View File

@ -5429,7 +5429,7 @@ void ClientUploadNoop(CONNECTION *c)
}
p = PackError(0);
PackAddInt(p, "noop", 1);
PackAddInt(p, "noop", NOOP);
(void)HttpClientSend(c->FirstSock, p);
FreePack(p);
@ -5440,6 +5440,24 @@ void ClientUploadNoop(CONNECTION *c)
}
}
void ServerUploadNoop(CONNECTION *c)
{
PACK *p;
// Validate arguments
if (c == NULL)
{
return;
}
p = PackError(0);
PackAddInt(p, "noop", NOOP_IGNORE);
(void)HttpServerSend(c->FirstSock, p);
FreePack(p);
// Client can't re-respond to an HTTP "response"
// so we don't wait for it on the server side
}
// Add client version information to the PACK
void PackAddClientVersion(PACK *p, CONNECTION *c)
{