Polyphase Game Engine
Loading...
Searching...
No Matches
NetMsg.h File Reference
#include "Constants.h"
#include "EngineTypes.h"
#include "Stream.h"
#include "Datum.h"

Go to the source code of this file.

Classes

struct  NetMsg
 
struct  NetMsgConnect
 
struct  NetMsgAccept
 
struct  NetMsgReject
 
struct  NetMsgDisconnect
 
struct  NetMsgKick
 
struct  NetMsgReady
 
struct  NetMsgPing
 
struct  NetMsgSpawn
 
struct  NetMsgDestroy
 
struct  NetMsgReplicate
 
struct  NetMsgReplicateScript
 
struct  NetMsgInvoke
 
struct  NetMsgInvokeScript
 
struct  NetMsgBroadcast
 
struct  NetMsgAck
 

Macros

#define NET_MESSAGE_MAGIC_STR   "OCTM"
 
#define NET_MSG_INTERFACE(Name)
 
#define NET_MSG_INTERFACE_RELIABLE(Name)
 

Enumerations

enum class  NetMsgType : uint8_t {
  Connect , Accept , Reject , Disconnect ,
  Kick , Ready , Spawn , Destroy ,
  Ping , Replicate , ReplicateScript , Invoke ,
  InvokeScript , Broadcast , Ack , Count
}
 

Macro Definition Documentation

◆ NET_MESSAGE_MAGIC_STR

#define NET_MESSAGE_MAGIC_STR   "OCTM"

◆ NET_MSG_INTERFACE

#define NET_MSG_INTERFACE (   Name)
Value:
virtual void Read(Stream& stream) override; \
virtual void Write(Stream& stream) const override; \
virtual void Execute(NetHost sender) override; \
virtual NetMsgType GetType() const override { return NetMsgType::Name; }
NetMsgType
Definition NetMsg.h:21
Definition Stream.h:21
Definition EngineTypes.h:489

◆ NET_MSG_INTERFACE_RELIABLE

#define NET_MSG_INTERFACE_RELIABLE (   Name)
Value:
virtual bool IsReliable() const override { return true; }
#define NET_MSG_INTERFACE(Name)
Definition NetMsg.h:10

Enumeration Type Documentation

◆ NetMsgType

enum class NetMsgType : uint8_t
strong
Enumerator
Connect 
Accept 
Reject 
Disconnect 
Kick 
Ready 
Spawn 
Destroy 
Ping 
Replicate 
ReplicateScript 
Invoke 
InvokeScript 
Broadcast 
Ack 
Count