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

Method CloseConnection

src/network/network_coordinator.cpp:440–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440NetworkRecvStatus ClientNetworkCoordinatorSocketHandler::CloseConnection(bool error)
441{
442 NetworkCoordinatorSocketHandler::CloseConnection(error);
443
444 this->CloseSocket();
445 this->connecting = false;
446
447 _network_server_connection_type = CONNECTION_TYPE_UNKNOWN;
448 this->next_update = {};
449
450 this->CloseAllConnections();
451
452 SetWindowDirty(WC_CLIENT_LIST, 0);
453
454 return NETWORK_RECV_STATUS_OKAY;
455}
456
457/**
458 * Register our server to receive our invite code.

Callers 7

Receive_GC_ERRORMethod · 0.95
Receive_GC_CONNECTINGMethod · 0.95
SendReceiveMethod · 0.95
OnFailureMethod · 0.45
CloseStunHandlerMethod · 0.45
CloseTurnHandlerMethod · 0.45

Calls 3

CloseAllConnectionsMethod · 0.95
SetWindowDirtyFunction · 0.85
CloseSocketMethod · 0.45

Tested by

no test coverage detected