OpenTTD Source  20241121-master-g67a0fccfad
network.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef NETWORK_H
11 #define NETWORK_H
12 
13 void NetworkStartUp();
14 void NetworkShutDown();
16 bool HasClients();
17 
18 extern bool _networking;
19 extern bool _network_server;
20 extern bool _network_available;
21 extern bool _network_dedicated;
22 extern bool _is_network_server;
23 
24 #endif /* NETWORK_H */
void NetworkStartUp()
This tries to launch the network for a given OS.
Definition: network.cpp:1283
bool _is_network_server
Does this client wants to be a network-server?
Definition: network.cpp:69
void NetworkDrawChatMessage()
Draw the chat message-box.
bool _network_available
is network mode available?
Definition: network.cpp:67
bool _networking
are we in networking mode?
Definition: network.cpp:65
bool _network_dedicated
are we a dedicated server?
Definition: network.cpp:68
bool HasClients()
Return whether there is any client connected or trying to connect at all.
Definition: network.cpp:97
bool _network_server
network-server is active
Definition: network.cpp:66
void NetworkShutDown()
This shuts the network down.
Definition: network.cpp:1301