MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CloseConnection

Method CloseConnection

src/network/network_content.cpp:736–746  ·  view source on GitHub ↗

* Disconnect from the content server. */

Source from the content-addressed store, hash-verified

734 * Disconnect from the content server.
735 */
736NetworkRecvStatus ClientNetworkContentSocketHandler::CloseConnection(bool)
737{
738 NetworkContentSocketHandler::CloseConnection();
739
740 if (this->sock == INVALID_SOCKET) return NETWORK_RECV_STATUS_OKAY;
741
742 this->CloseSocket();
743 this->OnDisconnect();
744
745 return NETWORK_RECV_STATUS_OKAY;
746}
747
748/**
749 * Cancel the current download.

Callers 4

Receive_SERVER_INFOMethod · 0.95
CancelMethod · 0.95
SendReceiveMethod · 0.95

Calls 2

OnDisconnectMethod · 0.95
CloseSocketMethod · 0.45

Tested by

no test coverage detected