The server is rebooting... * The only difference with NetworkDisconnect, is the packets that is sent */
| 975 | /* The server is rebooting... |
| 976 | * The only difference with NetworkDisconnect, is the packets that is sent */ |
| 977 | void NetworkReboot() |
| 978 | { |
| 979 | if (_network_server) { |
| 980 | for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) { |
| 981 | cs->SendNewGame(); |
| 982 | cs->SendPackets(); |
| 983 | } |
| 984 | |
| 985 | for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { |
| 986 | as->SendNewGame(); |
| 987 | as->SendPackets(); |
| 988 | } |
| 989 | } |
| 990 | |
| 991 | /* For non-dedicated servers we have to kick the admins as we are not |
| 992 | * certain that we will end up in a new network game. */ |
| 993 | NetworkClose(!_network_dedicated); |
| 994 | } |
| 995 | |
| 996 | /** |
| 997 | * We want to disconnect from the host/clients. |
no test coverage detected