2010-03-24 14:39:08 +01:00
|
|
|
|
// ==============================================================
|
|
|
|
|
// This file is part of Glest (www.glest.org)
|
|
|
|
|
//
|
2010-04-22 01:13:39 +02:00
|
|
|
|
// Copyright (C) 2001-2008 Marti<74>o Figueroa
|
2010-03-24 14:39:08 +01:00
|
|
|
|
//
|
|
|
|
|
// You can redistribute this code and/or modify it under
|
|
|
|
|
// the terms of the GNU General Public License as published
|
|
|
|
|
// by the Free Software Foundation; either version 2 of the
|
|
|
|
|
// License, or (at your option) any later version
|
|
|
|
|
// ==============================================================
|
|
|
|
|
|
|
|
|
|
#ifndef _GLEST_GAME_NETWORKMESSAGE_H_
|
|
|
|
|
#define _GLEST_GAME_NETWORKMESSAGE_H_
|
|
|
|
|
|
|
|
|
|
#include "socket.h"
|
|
|
|
|
#include "game_constants.h"
|
|
|
|
|
#include "network_types.h"
|
|
|
|
|
|
|
|
|
|
using Shared::Platform::Socket;
|
|
|
|
|
using Shared::Platform::int8;
|
2010-04-30 04:41:42 +02:00
|
|
|
|
using Shared::Platform::uint8;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
using Shared::Platform::int16;
|
|
|
|
|
|
|
|
|
|
namespace Glest{ namespace Game{
|
|
|
|
|
|
|
|
|
|
class GameSettings;
|
|
|
|
|
|
2010-05-04 04:32:43 +02:00
|
|
|
|
enum NetworkMessageType {
|
2010-03-24 14:39:08 +01:00
|
|
|
|
nmtInvalid,
|
|
|
|
|
nmtIntro,
|
|
|
|
|
nmtPing,
|
|
|
|
|
nmtReady,
|
|
|
|
|
nmtLaunch,
|
|
|
|
|
nmtCommandList,
|
|
|
|
|
nmtText,
|
|
|
|
|
nmtQuit,
|
|
|
|
|
nmtSynchNetworkGameData,
|
|
|
|
|
nmtSynchNetworkGameDataStatus,
|
|
|
|
|
nmtSynchNetworkGameDataFileCRCCheck,
|
|
|
|
|
nmtSynchNetworkGameDataFileGet,
|
2010-04-22 01:13:39 +02:00
|
|
|
|
nmtBroadCastSetup,
|
2010-04-29 01:59:37 +02:00
|
|
|
|
nmtSwitchSetupRequest,
|
2010-04-30 03:08:29 +02:00
|
|
|
|
nmtPlayerIndexMessage,
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
nmtCount
|
|
|
|
|
};
|
|
|
|
|
|
2010-05-12 17:25:56 +02:00
|
|
|
|
enum NetworkGameStateType {
|
|
|
|
|
nmgstInvalid,
|
|
|
|
|
nmgstOk,
|
|
|
|
|
nmgstNoSlots,
|
|
|
|
|
|
|
|
|
|
nmgstCount
|
|
|
|
|
};
|
|
|
|
|
|
2010-03-24 14:39:08 +01:00
|
|
|
|
const int32 commandListHeaderSize = 6;
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessage
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
2010-05-04 04:32:43 +02:00
|
|
|
|
class NetworkMessage {
|
2010-03-24 14:39:08 +01:00
|
|
|
|
public:
|
|
|
|
|
virtual ~NetworkMessage(){}
|
|
|
|
|
virtual bool receive(Socket* socket)= 0;
|
|
|
|
|
virtual void send(Socket* socket) const = 0;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
bool peek(Socket* socket, void* data, int dataSize);
|
|
|
|
|
bool receive(Socket* socket, void* data, int dataSize);
|
|
|
|
|
void send(Socket* socket, const void* data, int dataSize) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageIntro
|
|
|
|
|
//
|
|
|
|
|
// Message sent from the server to the client
|
|
|
|
|
// when the client connects and vice versa
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageIntro: public NetworkMessage{
|
|
|
|
|
private:
|
2010-04-30 08:45:30 +02:00
|
|
|
|
static const int maxVersionStringSize= 128;
|
|
|
|
|
static const int maxNameSize= 32;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
NetworkString<maxVersionStringSize> versionString;
|
|
|
|
|
NetworkString<maxNameSize> name;
|
|
|
|
|
int16 playerIndex;
|
2010-05-12 17:25:56 +02:00
|
|
|
|
int8 gameState;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageIntro();
|
2010-05-12 17:25:56 +02:00
|
|
|
|
NetworkMessageIntro(const string &versionString, const string &name, int playerIndex, NetworkGameStateType gameState);
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
2010-05-12 17:25:56 +02:00
|
|
|
|
string getVersionString() const { return data.versionString.getString(); }
|
|
|
|
|
string getName() const { return data.name.getString(); }
|
|
|
|
|
int getPlayerIndex() const { return data.playerIndex; }
|
|
|
|
|
NetworkGameStateType getGameState() const { return static_cast<NetworkGameStateType>(data.gameState); }
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageReady
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of the game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageReady: public NetworkMessage{
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
int32 checksum;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageReady();
|
|
|
|
|
NetworkMessageReady(int32 checksum);
|
|
|
|
|
|
|
|
|
|
int32 getChecksum() const {return data.checksum;}
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageLaunch
|
|
|
|
|
//
|
|
|
|
|
// Message sent from the server to the client
|
|
|
|
|
// to launch the game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageLaunch: public NetworkMessage{
|
|
|
|
|
private:
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
NetworkString<maxStringSize> description;
|
|
|
|
|
NetworkString<maxStringSize> map;
|
|
|
|
|
NetworkString<maxStringSize> tileset;
|
|
|
|
|
NetworkString<maxStringSize> tech;
|
|
|
|
|
NetworkString<maxStringSize> factionTypeNames[GameConstants::maxPlayers]; //faction names
|
2010-04-23 01:18:04 +02:00
|
|
|
|
NetworkString<maxStringSize> networkPlayerNames[GameConstants::maxPlayers]; //networkPlayerNames
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
int8 factionControls[GameConstants::maxPlayers];
|
|
|
|
|
|
|
|
|
|
int8 thisFactionIndex;
|
|
|
|
|
int8 factionCount;
|
|
|
|
|
int8 teams[GameConstants::maxPlayers];
|
|
|
|
|
int8 startLocationIndex[GameConstants::maxPlayers];
|
|
|
|
|
int8 defaultResources;
|
|
|
|
|
int8 defaultUnits;
|
|
|
|
|
int8 defaultVictoryConditions;
|
2010-03-27 08:09:34 +01:00
|
|
|
|
int8 fogOfWar;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageLaunch();
|
2010-04-22 01:13:39 +02:00
|
|
|
|
NetworkMessageLaunch(const GameSettings *gameSettings,int8 messageType);
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
void buildGameSettings(GameSettings *gameSettings) const;
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class CommandList
|
|
|
|
|
//
|
|
|
|
|
// Message to order a commands to several units
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
|
class NetworkMessageCommandList: public NetworkMessage{
|
|
|
|
|
private:
|
2010-04-30 04:34:19 +02:00
|
|
|
|
//static const int maxCommandCount= 16*4;
|
|
|
|
|
static const int maxCommandCount = (16 * 4) * 2;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
2010-04-30 04:41:42 +02:00
|
|
|
|
uint8 commandCount;
|
2010-05-01 12:46:56 +02:00
|
|
|
|
//int8 commandCount;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
int32 frameCount;
|
|
|
|
|
NetworkCommand commands[maxCommandCount];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageCommandList(int32 frameCount= -1);
|
|
|
|
|
|
|
|
|
|
bool addCommand(const NetworkCommand* networkCommand);
|
|
|
|
|
|
|
|
|
|
void clear() {data.commandCount= 0;}
|
|
|
|
|
int getCommandCount() const {return data.commandCount;}
|
|
|
|
|
int getFrameCount() const {return data.frameCount;}
|
|
|
|
|
const NetworkCommand* getCommand(int i) const {return &data.commands[i];}
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageText
|
|
|
|
|
//
|
|
|
|
|
// Chat text message
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageText: public NetworkMessage{
|
|
|
|
|
private:
|
2010-05-01 12:46:56 +02:00
|
|
|
|
static const int maxStringSize= 128;
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
NetworkString<maxStringSize> text;
|
|
|
|
|
NetworkString<maxStringSize> sender;
|
|
|
|
|
int8 teamIndex;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageText(){}
|
|
|
|
|
NetworkMessageText(const string &text, const string &sender, int teamIndex);
|
|
|
|
|
|
|
|
|
|
string getText() const {return data.text.getString();}
|
|
|
|
|
string getSender() const {return data.sender.getString();}
|
|
|
|
|
int getTeamIndex() const {return data.teamIndex;}
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageQuit
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of the game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageQuit: public NetworkMessage{
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageQuit();
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageSynchNetworkGameData
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of a network game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageSynchNetworkGameData: public NetworkMessage{
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
|
|
|
|
|
NetworkString<maxStringSize> map;
|
|
|
|
|
NetworkString<maxStringSize> tileset;
|
|
|
|
|
NetworkString<maxStringSize> tech;
|
|
|
|
|
|
|
|
|
|
int32 mapCRC;
|
|
|
|
|
int32 tilesetCRC;
|
|
|
|
|
int32 techCRC;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageSynchNetworkGameData() {};
|
|
|
|
|
NetworkMessageSynchNetworkGameData(const GameSettings *gameSettings);
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
|
|
|
|
|
string getMap() const {return data.map.getString();}
|
|
|
|
|
string getTileset() const {return data.tileset.getString();}
|
|
|
|
|
string getTech() const {return data.tech.getString();}
|
|
|
|
|
|
|
|
|
|
int32 getMapCRC() const {return data.mapCRC;}
|
|
|
|
|
int32 getTilesetCRC() const {return data.tilesetCRC;}
|
|
|
|
|
int32 getTechCRC() const {return data.techCRC;}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageSynchNetworkGameDataStatus
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of a network game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageSynchNetworkGameDataStatus: public NetworkMessage{
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
|
|
|
|
|
int32 mapCRC;
|
|
|
|
|
int32 tilesetCRC;
|
|
|
|
|
int32 techCRC;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageSynchNetworkGameDataStatus() {};
|
2010-03-27 08:09:34 +01:00
|
|
|
|
NetworkMessageSynchNetworkGameDataStatus(int32 mapCRC, int32 tilesetCRC, int32 techCRC);
|
2010-03-24 14:39:08 +01:00
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
|
|
|
|
|
int32 getMapCRC() const {return data.mapCRC;}
|
|
|
|
|
int32 getTilesetCRC() const {return data.tilesetCRC;}
|
|
|
|
|
int32 getTechCRC() const {return data.techCRC;}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageSynchNetworkGameDataFileCRCCheck
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of a network game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageSynchNetworkGameDataFileCRCCheck: public NetworkMessage{
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
|
|
|
|
|
int32 totalFileCount;
|
|
|
|
|
int32 fileIndex;
|
|
|
|
|
int32 fileCRC;
|
|
|
|
|
NetworkString<maxStringSize> fileName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageSynchNetworkGameDataFileCRCCheck() {};
|
|
|
|
|
NetworkMessageSynchNetworkGameDataFileCRCCheck(int32 totalFileCount, int32 fileIndex, int32 fileCRC, const string fileName);
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
|
|
|
|
|
int32 getTotalFileCount() const {return data.totalFileCount;}
|
|
|
|
|
int32 getFileIndex() const {return data.fileIndex;}
|
|
|
|
|
int32 getFileCRC() const {return data.fileCRC;}
|
|
|
|
|
string getFileName() const {return data.fileName.getString();}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// =====================================================
|
|
|
|
|
// class NetworkMessageSynchNetworkGameDataFileGet
|
|
|
|
|
//
|
|
|
|
|
// Message sent at the beggining of a network game
|
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class NetworkMessageSynchNetworkGameDataFileGet: public NetworkMessage{
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
|
|
|
|
|
NetworkString<maxStringSize> fileName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
NetworkMessageSynchNetworkGameDataFileGet() {};
|
|
|
|
|
NetworkMessageSynchNetworkGameDataFileGet(const string fileName);
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
|
|
|
|
|
string getFileName() const {return data.fileName.getString();}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2010-04-29 01:59:37 +02:00
|
|
|
|
// =====================================================
|
|
|
|
|
// class SwitchSetupRequest
|
|
|
|
|
//
|
2010-05-04 02:05:10 +02:00
|
|
|
|
// Message sent from the client to the server
|
|
|
|
|
// to switch its settings
|
2010-04-29 01:59:37 +02:00
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class SwitchSetupRequest: public NetworkMessage{
|
|
|
|
|
private:
|
|
|
|
|
static const int maxStringSize= 256;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
NetworkString<maxStringSize> selectedFactionName; //wanted faction name
|
|
|
|
|
int8 currentFactionIndex;
|
|
|
|
|
int8 toFactionIndex;
|
|
|
|
|
int8 toTeam;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
SwitchSetupRequest();
|
|
|
|
|
SwitchSetupRequest( string selectedFactionName, int8 currentFactionIndex, int8 toFactionIndex,int8 toTeam);
|
|
|
|
|
|
|
|
|
|
string getSelectedFactionName() const {return data.selectedFactionName.getString();}
|
|
|
|
|
int getCurrentFactionIndex() const {return data.currentFactionIndex;}
|
|
|
|
|
int getToFactionIndex() const {return data.toFactionIndex;}
|
|
|
|
|
int getToTeam() const {return data.toTeam;}
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
|
|
|
|
|
2010-04-30 03:08:29 +02:00
|
|
|
|
// =====================================================
|
2010-05-04 02:05:10 +02:00
|
|
|
|
// class PlayerIndexMessage
|
2010-04-30 03:08:29 +02:00
|
|
|
|
//
|
2010-05-04 02:05:10 +02:00
|
|
|
|
// Message sent from the server to the clients
|
|
|
|
|
// to tell them about a slot change ( caused by another client )
|
2010-04-30 03:08:29 +02:00
|
|
|
|
// =====================================================
|
|
|
|
|
|
|
|
|
|
class PlayerIndexMessage: public NetworkMessage{
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct Data{
|
|
|
|
|
int8 messageType;
|
|
|
|
|
int16 playerIndex;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Data data;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
PlayerIndexMessage( int16 playerIndex);
|
|
|
|
|
|
|
|
|
|
int16 getPlayerIndex() const {return data.playerIndex;}
|
|
|
|
|
|
|
|
|
|
virtual bool receive(Socket* socket);
|
|
|
|
|
virtual void send(Socket* socket) const;
|
|
|
|
|
};
|
2010-04-29 01:59:37 +02:00
|
|
|
|
|
2010-03-24 14:39:08 +01:00
|
|
|
|
}}//end namespace
|
|
|
|
|
|
|
|
|
|
#endif
|