# network_server.h

Go to the documentation of this file.

    00001 /* $Id: network_server.h 15428 2009-02-09 02:57:15Z rubidium $ */
    00002
    00005 #ifndef NETWORK_SERVER_H
    00006 #define NETWORK_SERVER_H
    00007
    00008 #ifdef ENABLE_NETWORK
    00009
    00010 DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP);
    00011 DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno);
    00012 DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error);
    00013 DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN);
    00014 DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME);
    00015 DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command);
    00016 DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_MOVE)(NetworkClientSocket *cs, uint16 client_id, CompanyID company_id);
    00017
    00018 bool NetworkServer_ReadPackets(NetworkClientSocket *cs);
    00019 void NetworkServer_Tick(bool send_frame);
    00020
    00021 #else /* ENABLE_NETWORK */
    00022 /* Network function stubs when networking is disabled */
    00023
    00024 static inline void NetworkServerMonthlyLoop() {}
    00025 static inline void NetworkServerYearlyLoop() {}
    00026
    00027 #endif /* ENABLE_NETWORK */
    00028
    00029 #endif /* NETWORK_SERVER_H */