#include "netpeermanager.h"
Include dependency graph for netstructs.h:
Go to the source code of this file.
Classes | |
struct | NetBasicData |
struct | NetBasicAdminData |
struct | NetAdminSpeed |
struct | NetAdminReject |
struct | NetConnectData |
struct | NetDisconnectData |
struct | NetConnectionList |
struct | NetValue32Data |
Defines | |
#define | TYP_ADMIN_SPEED 0x010 |
Packet sets time for one turn in the game. | |
#define | TYP_ADMIN_CLOSE 0x020 |
Packet closes the server application. | |
#define | TYP_ADMIN_REJECT 0x031 |
Packet rejects a player from the game. | |
#define | TYP_ADMIN_MAXPING 0x081 |
Packet requests the longest ping to a client. | |
#define | MAX_ADMIN_PASSWORD 31 |
max length of admin-password for accessing the server | |
#define | TYP_CONNECT 0x101 |
Packet used to connect to another machine (usually directly sent after the connection request). | |
#define | TYP_DISCONNECT 0x102 |
Packet used to disconnect from a host (usually sent directly befor disconnecting). | |
#define | TYP_CONNECTIONLIST 0x108 |
Packet contains a list with the connections, it has to others. | |
#define | TYP_PING_REQUEST 0x110 |
Packet requests a ping answer, used to calculate the ping time. | |
#define | TYP_PING_ANSWER 0x111 |
Packet is the answer on a ping request. | |
#define | TYP_CHAT_MESSAGE 0x202 |
Indicates a chat message. | |
#define | TYP_NEXT_TURN 0x301 |
indicates the start of the next turn | |
#define | TYP_BASIC_COMMAND 0x400 |
basic id of commands |
Required header file:
#include <netstructs.h>
Using data of this file is especially neccessary when working with the NetPeerManager class.
In this file, several structs are deklared, that should help making network communication easier. Some are used by the NetPeerSocket class. The integer values of the structs have NBO, but support reading them in OSBO.
The file also defines more or less important values for peer to peer communication. The definitiones used for indicating a special type of message begin with TYP_. The TYP_ADMIN_... definitiones are used for a game's administration, which is only allowed for the admin(s), who have the password.