Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
PingPongPacket Class Reference

The Ping Pong Packet. More...

#include <pingpong.h>

Inheritance diagram for PingPongPacket:
IPacket

Public Member Functions

 PingPongPacket ()
 Construct a new Server List Packet object.
 
 ~PingPongPacket () override=default
 Destroy the Server List Packet object.
 
void read (IMCStream *stream) override
 Read Packet Data.
 
- Public Member Functions inherited from IPacket
virtual ~IPacket ()=default
 Destroy the IPacket object.
 
void send (IMCStream *stream)
 Sends a Packet in Minecraft format.
 

Static Public Member Functions

static void loadLua (lua_State *state, const char *baseNamespaceName)
 Loads this Packet as lua class.
 

Public Attributes

long payload
 Payload.
 
- Public Attributes inherited from IPacket
int id
 Packet Id.
 

Protected Member Functions

void write (IMCStream *stream) override
 Write Packet Data.
 
- Protected Member Functions inherited from IPacket
 IPacket (int id)
 Construct a new IPacket object.
 

Detailed Description

The Ping Pong Packet.

Packet for detecting the ping between the client and the server.

Member Function Documentation

◆ loadLua()

void PingPongPacket::loadLua ( lua_State * state,
const char * baseNamespaceName )
static

Loads this Packet as lua class.

Parameters
statelua state to load to
baseNamespaceNamethe namespace name

◆ read()

void PingPongPacket::read ( IMCStream * stream)
overridevirtual

Read Packet Data.

Reads the payload from the client

Parameters
streamthe stream to read from

Implements IPacket.

◆ write()

void PingPongPacket::write ( IMCStream * stream)
overrideprotectedvirtual

Write Packet Data.

Writes back the payload obtained

Parameters
streamthe stream to write to

Implements IPacket.

Member Data Documentation

◆ payload

long PingPongPacket::payload

Payload.

Client's payload used to calculate ping


The documentation for this class was generated from the following files: