_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
net_message.h File Reference
#include <stdint.h>
#include <vector>
#include "settings.h"

Go to the source code of this file.

Classes

class  CNetworkHost
 
class  ServerSetupStateRacesArray
 
class  CServerSetup
 
class  CInitMessage_Header
 
class  CInitMessage_Hello
 
class  CInitMessage_Config
 
class  CInitMessage_EngineMismatch
 
class  CInitMessage_LuaFilesMismatch
 
class  CInitMessage_Welcome
 
class  CInitMessage_Map
 
class  CInitMessage_MapFileFragment
 
class  CInitMessage_State
 
class  CInitMessage_Resync
 
class  CNetworkCommand
 
class  CNetworkExtendedCommand
 
class  CNetworkChat
 
class  CNetworkCommandSync
 
class  CNetworkCommandQuit
 
class  CNetworkSelection
 
class  CNetworkPacketHeader
 
class  CNetworkPacket
 

net_message.h - The network message header file.

#define NetPlayerNameSize   16
 
#define MaxNetworkCommands   9
 
enum  _ic_message_subtype_ {
  ICMHello, ICMConfig, ICMEngineMismatch, ICMLuaFilesMismatch,
  ICMEngineConfMismatch, ICMMapUidMismatch, ICMGameFull, ICMWelcome,
  ICMWaiting, ICMMap, ICMState, ICMResync,
  ICMServerQuit, ICMGoodBye, ICMSeeYou, ICMGo,
  ICMAYT, ICMIAH, ICMMapNeeded
}
 
enum  _message_type_ {
  MessageNone, MessageInit_FromClient, MessageInit_FromServer, MessageSync,
  MessageSelection, MessageQuit, MessageResend, MessageChat,
  MessageCommandStop, MessageCommandStand, MessageCommandDefend, MessageCommandFollow,
  MessageCommandMove, MessageCommandRepair, MessageCommandAutoRepair, MessageCommandAttack,
  MessageCommandGround, MessageCommandPatrol, MessageCommandBoard, MessageCommandUnload,
  MessageCommandBuild, MessageCommandExplore, MessageCommandDismiss, MessageCommandResourceLoc,
  MessageCommandResource, MessageCommandReturn, MessageCommandTrain, MessageCommandCancelTrain,
  MessageCommandUpgrade, MessageCommandCancelUpgrade, MessageCommandResearch, MessageCommandCancelResearch,
  MessageExtendedCommand, MessageCommandSpellCast
}
 
enum  _extended_message_type_ {
  ExtendedMessageDiplomacy, ExtendedMessageSharedVision, ExtendedMessageAutoTargetingDB, ExtendedMessageFieldOfViewDB,
  ExtendedMessageMapFieldsOpacityDB, ExtendedMessageRevealMapDB, ExtendedMessageFogOfWarDB
}
 
ENUM_CLASS SlotOption
 
ENUM_CLASS Computer
 
ENUM_CLASS Closed
 

Macro Definition Documentation

◆ MaxNetworkCommands

#define MaxNetworkCommands   9

◆ NetPlayerNameSize

#define NetPlayerNameSize   16

Number of bytes in the name of a network player, including the terminating null character.

Enumeration Type Documentation

◆ _extended_message_type_

Network extended message types.

Enumerator
ExtendedMessageDiplomacy 
ExtendedMessageSharedVision 

Change diplomacy.

ExtendedMessageAutoTargetingDB 

Change shared vision.

ExtendedMessageFieldOfViewDB 

Change Auto targetting algorithm. Used for debug purposes.

ExtendedMessageMapFieldsOpacityDB 

Change field of view type (shadow casting or radial). Used for debug purposes.

ExtendedMessageRevealMapDB 

Change opaque flag for forest, rocks or walls. Used for debug purposes.

ExtendedMessageFogOfWarDB 

Change map reveal mode. Used for debug purposes.

Enable/Disable fog of war. Used for debug purposes

◆ _ic_message_subtype_

Network init config message subtypes (menu state machine).

Enumerator
ICMHello 
ICMConfig 

Client Request.

ICMEngineMismatch 

Setup message configure clients.

ICMLuaFilesMismatch 

Stratagus engine version doesn't match.

ICMEngineConfMismatch 

Network protocol version doesn't match.

ICMMapUidMismatch 

UNUSED:Engine configuration isn't identical.

ICMGameFull 

MAP UID doesn't match.

ICMWelcome 

No player slots available.

ICMWaiting 

Acknowledge for new client connections.

ICMMap 

Client has received Welcome and is waiting for Map/State.

ICMState 

MapInfo (and Mapinfo Ack)

ICMResync 

StateInfo.

ICMServerQuit 

Ack StateInfo change.

ICMGoodBye 

Server has quit game.

ICMSeeYou 

Client wants to leave game.

ICMGo 

Client has left game.

ICMAYT 

Client is ready to run.

ICMIAH 

Server asks are you there.

ICMMapNeeded 

Client answers I am here.

◆ _message_type_

Network message types.

Todo:
cleanup the message types.
Enumerator
MessageNone 
MessageInit_FromClient 

When Nothing Is Happening.

MessageInit_FromServer 

Start connection.

MessageSync 

Connection reply.

MessageSelection 

Heart beat.

MessageQuit 

Update a Selection from Team Player.

MessageResend 

Quit game.

MessageChat 

Resend message.

MessageCommandStop 

Chat message.

MessageCommandStand 

Unit command stop.

MessageCommandDefend 

Unit command stand ground.

MessageCommandFollow 

Unit command defend.

MessageCommandMove 

Unit command follow.

MessageCommandRepair 

Unit command move.

MessageCommandAutoRepair 

Unit command repair.

MessageCommandAttack 

Unit command autorepair.

MessageCommandGround 

Unit command attack.

MessageCommandPatrol 

Unit command attack ground.

MessageCommandBoard 

Unit command patrol.

MessageCommandUnload 

Unit command board.

MessageCommandBuild 

Unit command unload.

MessageCommandExplore 

Unit command build building.

MessageCommandDismiss 

Unit command explore.

MessageCommandResourceLoc 

Unit command dismiss unit.

MessageCommandResource 

Unit command resource location.

MessageCommandReturn 

Unit command resource.

MessageCommandTrain 

Unit command return goods.

MessageCommandCancelTrain 

Unit command train.

MessageCommandUpgrade 

Unit command cancel training.

MessageCommandCancelUpgrade 

Unit command upgrade.

MessageCommandResearch 

Unit command cancel upgrade.

MessageCommandCancelResearch 

Unit command research.

MessageExtendedCommand 

Unit command cancel research.

MessageCommandSpellCast 

Command is the next byte.

Unit command spell cast

Variable Documentation

◆ Closed

ENUM_CLASS Closed

◆ Computer

ENUM_CLASS Computer

◆ SlotOption

ENUM_CLASS SlotOption
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.