OpenTTD
|
Basic functions to receive and send TCP packets for game purposes. More...
#include "os_abstraction.h"
#include "tcp.h"
#include "../network_type.h"
#include "../../core/pool_type.hpp"
Go to the source code of this file.
Data Structures | |
class | CommandQueue |
A queue of CommandPackets. More... | |
class | NetworkGameSocketHandler |
Base socket handler for all TCP sockets. More... | |
Basic functions to receive and send TCP packets for game purposes.
Definition in file tcp_game.h.
enum PacketGameType |
Enum with all types of TCP packets.
For the exact meaning, look at NetworkGameSocketHandler.
Enumerator | |
---|---|
PACKET_SERVER_FULL | The server is full and has no place for you. |
PACKET_SERVER_BANNED | The server has banned you. |
PACKET_CLIENT_JOIN | The client telling the server it wants to join. |
PACKET_SERVER_ERROR | Server sending an error message to the client. |
PACKET_CLIENT_COMPANY_INFO | Request information about all companies. |
PACKET_SERVER_COMPANY_INFO | Information about a single company. |
PACKET_SERVER_CHECK_NEWGRFS | Server sends NewGRF IDs and MD5 checksums for the client to check. |
PACKET_CLIENT_NEWGRFS_CHECKED | Client acknowledges that it has all required NewGRFs. |
PACKET_SERVER_NEED_GAME_PASSWORD | Server requests the (hashed) game password. |
PACKET_CLIENT_GAME_PASSWORD | Clients sends the (hashed) game password. |
PACKET_SERVER_NEED_COMPANY_PASSWORD | Server requests the (hashed) company password. |
PACKET_CLIENT_COMPANY_PASSWORD | Client sends the (hashed) company password. |
PACKET_SERVER_WELCOME | Server welcomes you and gives you your ClientID. |
PACKET_SERVER_CLIENT_INFO | Server sends you information about a client. |
PACKET_CLIENT_GETMAP | Client requests the actual map. |
PACKET_SERVER_WAIT | Server tells the client there are some people waiting for the map as well. |
PACKET_SERVER_MAP_BEGIN | Server tells the client that it is beginning to send the map. |
PACKET_SERVER_MAP_SIZE | Server tells the client what the (compressed) size of the map is. |
PACKET_SERVER_MAP_DATA | Server sends bits of the map to the client. |
PACKET_SERVER_MAP_DONE | Server tells it has just sent the last bits of the map to the client. |
PACKET_CLIENT_MAP_OK | Client tells the server that it received the whole map. |
PACKET_SERVER_JOIN | Tells clients that a new client has joined. |
PACKET_SERVER_FRAME | Server tells the client what frame it is in, and thus to where the client may progress. |
PACKET_CLIENT_ACK | The client tells the server which frame it has executed. |
PACKET_SERVER_SYNC | Server tells the client what the random state should be. |
PACKET_CLIENT_COMMAND | Client executed a command and sends it to the server. |
PACKET_SERVER_COMMAND | Server distributes a command to (all) the clients. |
PACKET_CLIENT_CHAT | Client said something that should be distributed. |
PACKET_SERVER_CHAT | Server distributing the message of a client (or itself). |
PACKET_CLIENT_RCON | Client asks the server to execute some command. |
PACKET_SERVER_RCON | Response of the executed command on the server. |
PACKET_CLIENT_MOVE | A client would like to be moved to another company. |
PACKET_SERVER_MOVE | Server tells everyone that someone is moved to another company. |
PACKET_CLIENT_SET_PASSWORD | A client (re)sets its company's password. |
PACKET_CLIENT_SET_NAME | A client changes its name. |
PACKET_SERVER_COMPANY_UPDATE | Information (password) of a company changed. |
PACKET_SERVER_CONFIG_UPDATE | Some network configuration important to the client changed. |
PACKET_SERVER_NEWGAME | The server is preparing to start a new game. |
PACKET_SERVER_SHUTDOWN | The server is shutting down. |
PACKET_CLIENT_QUIT | A client tells the server it is going to quit. |
PACKET_SERVER_QUIT | A server tells that a client has quit. |
PACKET_CLIENT_ERROR | A client reports an error to the server. |
PACKET_SERVER_ERROR_QUIT | A server tells that a client has hit an error and did quit. |
PACKET_END | Must ALWAYS be on the end of this list!! (period) |
Definition at line 28 of file tcp_game.h.