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

Function NetworkReceive

src/network/network.cpp:1051–1062  ·  view source on GitHub ↗

* Receives something from the network. * @return true if everything went fine, false when the connection got closed. */

Source from the content-addressed store, hash-verified

1049 * @return true if everything went fine, false when the connection got closed.
1050 */
1051static bool NetworkReceive()
1052{
1053 bool result;
1054 if (_network_server) {
1055 ServerNetworkAdminSocketHandler::Receive();
1056 result = ServerNetworkGameSocketHandler::Receive();
1057 } else {
1058 result = ClientNetworkGameSocketHandler::Receive();
1059 }
1060 NetworkGameSocketHandler::ProcessDeferredDeletions();
1061 return result;
1062}
1063
1064/* This sends all buffered commands (if possible) */
1065static void NetworkSend()

Callers 1

NetworkGameLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected