mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Codechange: define the size of the PacketType enumerations
This commit is contained in:
parent
6f77c2eaa2
commit
63708609fb
@ -21,7 +21,7 @@
|
|||||||
* Enum with types of TCP packets specific to the admin network.
|
* Enum with types of TCP packets specific to the admin network.
|
||||||
* This protocol may only be extended to ensure stability.
|
* This protocol may only be extended to ensure stability.
|
||||||
*/
|
*/
|
||||||
enum PacketAdminType {
|
enum PacketAdminType : uint8_t {
|
||||||
ADMIN_PACKET_ADMIN_JOIN, ///< The admin announces and authenticates itself to the server.
|
ADMIN_PACKET_ADMIN_JOIN, ///< The admin announces and authenticates itself to the server.
|
||||||
ADMIN_PACKET_ADMIN_QUIT, ///< The admin tells the server that it is quitting.
|
ADMIN_PACKET_ADMIN_QUIT, ///< The admin tells the server that it is quitting.
|
||||||
ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY, ///< The admin tells the server the update frequency of a particular piece of information.
|
ADMIN_PACKET_ADMIN_UPDATE_FREQUENCY, ///< The admin tells the server the update frequency of a particular piece of information.
|
||||||
|
@ -32,7 +32,7 @@ enum ContentType {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** Enum with all types of TCP content packets. The order MUST not be changed **/
|
/** Enum with all types of TCP content packets. The order MUST not be changed **/
|
||||||
enum PacketContentType {
|
enum PacketContentType : uint8_t {
|
||||||
PACKET_CONTENT_CLIENT_INFO_LIST, ///< Queries the content server for a list of info of a given content type
|
PACKET_CONTENT_CLIENT_INFO_LIST, ///< Queries the content server for a list of info of a given content type
|
||||||
PACKET_CONTENT_CLIENT_INFO_ID, ///< Queries the content server for information about a list of internal IDs
|
PACKET_CONTENT_CLIENT_INFO_ID, ///< Queries the content server for information about a list of internal IDs
|
||||||
PACKET_CONTENT_CLIENT_INFO_EXTID, ///< Queries the content server for information about a list of external IDs
|
PACKET_CONTENT_CLIENT_INFO_EXTID, ///< Queries the content server for information about a list of external IDs
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* CLIENT -> packets from Client to Game Coordinator.
|
* CLIENT -> packets from Client to Game Coordinator.
|
||||||
* SERCLI -> packets from either the Server or Client to Game Coordinator.
|
* SERCLI -> packets from either the Server or Client to Game Coordinator.
|
||||||
**/
|
**/
|
||||||
enum PacketCoordinatorType {
|
enum PacketCoordinatorType : uint8_t {
|
||||||
PACKET_COORDINATOR_GC_ERROR, ///< Game Coordinator indicates there was an error.
|
PACKET_COORDINATOR_GC_ERROR, ///< Game Coordinator indicates there was an error.
|
||||||
PACKET_COORDINATOR_SERVER_REGISTER, ///< Server registration.
|
PACKET_COORDINATOR_SERVER_REGISTER, ///< Server registration.
|
||||||
PACKET_COORDINATOR_GC_REGISTER_ACK, ///< Game Coordinator accepts the registration.
|
PACKET_COORDINATOR_GC_REGISTER_ACK, ///< Game Coordinator accepts the registration.
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* Enum with all types of TCP packets.
|
* Enum with all types of TCP packets.
|
||||||
* For the exact meaning, look at #NetworkGameSocketHandler.
|
* For the exact meaning, look at #NetworkGameSocketHandler.
|
||||||
*/
|
*/
|
||||||
enum PacketGameType {
|
enum PacketGameType : uint8_t {
|
||||||
/*
|
/*
|
||||||
* These first four pair of packets (thus eight in
|
* These first four pair of packets (thus eight in
|
||||||
* total) must remain in this order for backward
|
* total) must remain in this order for backward
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
|
|
||||||
/** Enum with all types of TCP STUN packets. The order MUST not be changed. **/
|
/** Enum with all types of TCP STUN packets. The order MUST not be changed. **/
|
||||||
enum PacketStunType {
|
enum PacketStunType : uint8_t {
|
||||||
PACKET_STUN_SERCLI_STUN, ///< Send a STUN request to the STUN server.
|
PACKET_STUN_SERCLI_STUN, ///< Send a STUN request to the STUN server.
|
||||||
PACKET_STUN_END, ///< Must ALWAYS be on the end of this list!! (period)
|
PACKET_STUN_END, ///< Must ALWAYS be on the end of this list!! (period)
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "network_game_info.h"
|
#include "network_game_info.h"
|
||||||
|
|
||||||
/** Enum with all types of TCP TURN packets. The order MUST not be changed. **/
|
/** Enum with all types of TCP TURN packets. The order MUST not be changed. **/
|
||||||
enum PacketTurnType {
|
enum PacketTurnType : uint8_t {
|
||||||
PACKET_TURN_TURN_ERROR, ///< TURN server is unable to relay.
|
PACKET_TURN_TURN_ERROR, ///< TURN server is unable to relay.
|
||||||
PACKET_TURN_SERCLI_CONNECT, ///< Client or server is connecting to the TURN server.
|
PACKET_TURN_SERCLI_CONNECT, ///< Client or server is connecting to the TURN server.
|
||||||
PACKET_TURN_TURN_CONNECTED, ///< TURN server indicates the socket is now being relayed.
|
PACKET_TURN_TURN_CONNECTED, ///< TURN server indicates the socket is now being relayed.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
|
|
||||||
/** Enum with all types of UDP packets. The order MUST not be changed **/
|
/** Enum with all types of UDP packets. The order MUST not be changed **/
|
||||||
enum PacketUDPType {
|
enum PacketUDPType : uint8_t {
|
||||||
PACKET_UDP_CLIENT_FIND_SERVER, ///< Queries a game server for game information
|
PACKET_UDP_CLIENT_FIND_SERVER, ///< Queries a game server for game information
|
||||||
PACKET_UDP_SERVER_RESPONSE, ///< Reply of the game server with game information
|
PACKET_UDP_SERVER_RESPONSE, ///< Reply of the game server with game information
|
||||||
PACKET_UDP_END, ///< Must ALWAYS be on the end of this list!! (period)
|
PACKET_UDP_END, ///< Must ALWAYS be on the end of this list!! (period)
|
||||||
|
Loading…
Reference in New Issue
Block a user