Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetMessages.h
Show All 22 Lines | |||||
#ifndef NETMESSAGES_H | #ifndef NETMESSAGES_H | ||||
#define NETMESSAGES_H | #define NETMESSAGES_H | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "scriptinterface/ScriptVal.h" | #include "scriptinterface/ScriptVal.h" | ||||
#define PS_PROTOCOL_MAGIC 0x5073013f // 'P', 's', 0x01, '?' | #define PS_PROTOCOL_MAGIC 0x5073013f // 'P', 's', 0x01, '?' | ||||
#define PS_PROTOCOL_MAGIC_RESPONSE 0x50630121 // 'P', 'c', 0x01, '!' | #define PS_PROTOCOL_MAGIC_RESPONSE 0x50630121 // 'P', 'c', 0x01, '!' | ||||
#define PS_PROTOCOL_VERSION 0x01010015 // Arbitrary protocol | #define PS_PROTOCOL_VERSION 0x01010016 // Arbitrary protocol | ||||
#define PS_DEFAULT_PORT 0x5073 // 'P', 's' | #define PS_DEFAULT_PORT 0x5073 // 'P', 's' | ||||
// Defines the list of message types. The order of the list must not change. | // Defines the list of message types. The order of the list must not change. | ||||
// The message types having a negative value are used internally and not sent | // The message types having a negative value are used internally and not sent | ||||
// over the network. The message types used for network communication have | // over the network. The message types used for network communication have | ||||
// positive values. | // positive values. | ||||
enum NetMessageType | enum NetMessageType | ||||
{ | { | ||||
NMT_CONNECT_COMPLETE = -256, | NMT_CONNECT_COMPLETE = -256, | ||||
NMT_CONNECTION_LOST, | NMT_CONNECTION_LOST, | ||||
NMT_INVALID = 0, | NMT_INVALID = 0, | ||||
NMT_SERVER_HANDSHAKE, | NMT_SERVER_HANDSHAKE, | ||||
NMT_CLIENT_HANDSHAKE, | NMT_CLIENT_HANDSHAKE, | ||||
NMT_SERVER_HANDSHAKE_RESPONSE, | NMT_SERVER_HANDSHAKE_RESPONSE, | ||||
NMT_AUTHENTICATE, | NMT_AUTHENTICATE, | ||||
NMT_AUTHENTICATE_RESULT, | NMT_AUTHENTICATE_RESULT, | ||||
NMT_CHAT, | NMT_CHAT, | ||||
NMT_READY, | NMT_READY, | ||||
NMT_CLEAR_ALL_READY, | NMT_CLEAR_ALL_READY, | ||||
NMT_GAME_SETUP, | NMT_GAME_SETUP, | ||||
NMT_ASSIGN_PLAYER, | NMT_ASSIGN_PLAYER, | ||||
NMT_CHANGE_SETTING, | |||||
NMT_PLAYER_ASSIGNMENT, | NMT_PLAYER_ASSIGNMENT, | ||||
NMT_FILE_TRANSFER_REQUEST, | NMT_FILE_TRANSFER_REQUEST, | ||||
NMT_FILE_TRANSFER_RESPONSE, | NMT_FILE_TRANSFER_RESPONSE, | ||||
NMT_FILE_TRANSFER_DATA, | NMT_FILE_TRANSFER_DATA, | ||||
NMT_FILE_TRANSFER_ACK, | NMT_FILE_TRANSFER_ACK, | ||||
NMT_JOIN_SYNC_START, | NMT_JOIN_SYNC_START, | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator