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

Method Receive

src/network/network_query.cpp:59–69  ·  view source on GitHub ↗

* Check whether we received/can send some data from/to the server and * when that's the case handle it appropriately. * @return true when everything went okay. */

Source from the content-addressed store, hash-verified

57 * @return true when everything went okay.
58 */
59bool QueryNetworkGameSocketHandler::Receive()
60{
61 if (this->CanSendReceive()) {
62 NetworkRecvStatus res = this->ReceivePackets();
63 if (res != NETWORK_RECV_STATUS_OKAY) {
64 this->CloseConnection(res);
65 return false;
66 }
67 }
68 return true;
69}
70
71/** Send the packets of this socket handler. */
72void QueryNetworkGameSocketHandler::Send()

Callers 1

SendReceiveMethod · 0.45

Calls 3

CloseConnectionMethod · 0.95
CanSendReceiveMethod · 0.80
ReceivePacketsMethod · 0.45

Tested by

no test coverage detected