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

Method SendErrorQuit

src/network/network_server.cpp:727–738  ·  view source on GitHub ↗

* Tell the client another client quit with an error. * @param client_id The client that quit. * @param errorno The reason the client quit. */

Source from the content-addressed store, hash-verified

725 * @param errorno The reason the client quit.
726 */
727NetworkRecvStatus ServerNetworkGameSocketHandler::SendErrorQuit(ClientID client_id, NetworkErrorCode errorno)
728{
729 Debug(net, 9, "client[{}] SendErrorQuit(): client_id={}, errorno={}", this->client_id, client_id, errorno);
730
731 auto p = std::make_unique<Packet>(this, PACKET_SERVER_ERROR_QUIT);
732
733 p->Send_uint32(client_id);
734 p->Send_uint8 (errorno);
735
736 this->SendPacket(std::move(p));
737 return NETWORK_RECV_STATUS_OKAY;
738}
739
740/**
741 * Tell the client another client quit.

Callers 3

CloseConnectionMethod · 0.80
SendErrorMethod · 0.80
Receive_CLIENT_ERRORMethod · 0.80

Calls 3

Send_uint32Method · 0.80
Send_uint8Method · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected