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

Method SendJoin

src/network/network_client.cpp:285–301  ·  view source on GitHub ↗

Tell the server we would like to join. */

Source from the content-addressed store, hash-verified

283
284/** Tell the server we would like to join. */
285NetworkRecvStatus ClientNetworkGameSocketHandler::SendJoin()
286{
287 Debug(net, 9, "Client::SendJoin()");
288
289 Debug(net, 9, "Client::status = JOIN");
290 my_client->status = STATUS_JOIN;
291 Debug(net, 9, "Client::join_status = AUTHORIZING");
292 _network_join_status = NETWORK_JOIN_STATUS_AUTHORIZING;
293 SetWindowDirty(WC_NETWORK_STATUS_WINDOW, WN_NETWORK_STATUS_WINDOW_JOIN);
294
295 auto p = std::make_unique<Packet>(my_client, PACKET_CLIENT_JOIN);
296 p->Send_string(GetNetworkRevisionString());
297 p->Send_uint32(_openttd_newgrf_version);
298 my_client->SendPacket(std::move(p));
299
300 return NETWORK_RECV_STATUS_OKAY;
301}
302
303NetworkRecvStatus ClientNetworkGameSocketHandler::SendIdentify()
304{

Callers

nothing calls this directly

Calls 5

SetWindowDirtyFunction · 0.85
GetNetworkRevisionStringFunction · 0.85
Send_stringMethod · 0.80
Send_uint32Method · 0.80
SendPacketMethod · 0.45

Tested by

no test coverage detected