Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261)
* Codechange: [Network] split CloseSocket and CloseConnection more clearly - CloseSocket now closes the actual OS socket. - CloseConnection frees up the resources to just before CloseSocket. - dtors call CloseSocket / CloseConnection where needed.
This commit is contained in:
@@ -137,17 +137,6 @@ const char *ContentInfo::GetTextfile(TextfileType type) const
|
||||
return ::GetTextfile(type, GetContentInfoSubDir(this->type), tmp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the actual socket.
|
||||
*/
|
||||
void NetworkContentSocketHandler::CloseSocket()
|
||||
{
|
||||
if (this->sock == INVALID_SOCKET) return;
|
||||
|
||||
closesocket(this->sock);
|
||||
this->sock = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the given packet, i.e. pass it to the right
|
||||
* parser receive command.
|
||||
|
Reference in New Issue
Block a user