Limit the avatar requests by the server - clients may only upload one avatar within a certain time. This is checked by IP address, so two players within the same NAT system might have to wait for a few seconds.

This commit is contained in:
lotodore
2008-02-24 12:56:39 +00:00
parent 75ef6616e8
commit 7283431c8c
8 changed files with 117 additions and 18 deletions
+9
View File
@@ -73,6 +73,15 @@ socket_string_to_addr(const char *str, int addrFamily, struct sockaddr * addr, i
return retVal;
}
bool
socket_addr_to_string(struct sockaddr *addr, int addrLen, int addrFamily, char *str, int strLen)
{
bool retVal = false;
retVal = (WSAAddressToStringA(addr, addrLen, NULL, str, (DWORD *)&strLen) != SOCKET_ERROR);
return retVal;
}
bool
socket_resolve(const char *str, const char *port, int addrFamily, int sockType, int protocol, struct sockaddr *addr, int addrLen)
{