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

Method SendCmdLogging

src/network/network_admin.cpp:606–619  ·  view source on GitHub ↗

* Send a command for logging purposes. * @param client_id The client executing the command. * @param cp The command that would be executed. */

Source from the content-addressed store, hash-verified

604 * @param cp The command that would be executed.
605 */
606NetworkRecvStatus ServerNetworkAdminSocketHandler::SendCmdLogging(ClientID client_id, const CommandPacket &cp)
607{
608 auto p = std::make_unique<Packet>(this, ADMIN_PACKET_SERVER_CMD_LOGGING);
609
610 p->Send_uint32(client_id);
611 p->Send_uint8 (cp.company);
612 p->Send_uint16(cp.cmd);
613 p->Send_buffer(cp.data);
614 p->Send_uint32(cp.frame);
615
616 this->SendPacket(std::move(p));
617
618 return NETWORK_RECV_STATUS_OKAY;
619}
620
621/***********
622 * Receiving functions

Callers 1

NetworkAdminCmdLoggingFunction · 0.80

Calls 5

Send_uint32Method · 0.80
Send_uint16Method · 0.80
Send_bufferMethod · 0.80
Send_uint8Method · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected