GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
SERVER_HANDSHAKE_DataPacket Class Reference

Public Member Functions

 encode ()
 
 decode ()
 
- Public Member Functions inherited from Packet
 encode ()
 
 decode ()
 
 clean ()
 

Data Fields

 $address
 
 $port
 
 $systemAddresses
 
 $sendPing
 
 $sendPong
 
- Data Fields inherited from Packet
 $buffer
 
 $sendTime
 

Static Public Attributes

static $ID = 0x10
 
- Static Public Attributes inherited from Packet
static $ID = -1
 

Additional Inherited Members

- Protected Member Functions inherited from Packet
 get ($len)
 
 getLong ($signed=true)
 
 getInt ()
 
 getShort ($signed=true)
 
 getTriad ()
 
 getLTriad ()
 
 getByte ()
 
 getString ()
 
 getAddress (&$addr, &$port, &$version=null)
 
 feof ()
 
 put ($str)
 
 putLong ($v)
 
 putInt ($v)
 
 putShort ($v)
 
 putTriad ($v)
 
 putLTriad ($v)
 
 putByte ($v)
 
 putString ($v)
 
 putAddress ($addr, $port, $version=4)
 
- Protected Attributes inherited from Packet
 $offset = 0
 

Member Function Documentation

◆ decode()

decode ( )
59  {
60  parent::decode();
61  //TODO, not needed yet
62  }

◆ encode()

encode ( )
47  {
48  parent::encode();
49  $this->putAddress($this->address, $this->port, 4);
50  $this->putShort(0);
51  for($i = 0; $i < 10; ++$i){
52  $this->putAddress($this->systemAddresses[$i][0], $this->systemAddresses[$i][1], $this->systemAddresses[$i][2]);
53  }
54 
55  $this->putLong($this->sendPing);
56  $this->putLong($this->sendPong);
57  }

Field Documentation

◆ $address

$address

◆ $ID

$ID = 0x10
static

◆ $port

$port

◆ $sendPing

$sendPing

◆ $sendPong

$sendPong

◆ $systemAddresses

$systemAddresses
Initial value:
= [
["127.0.0.1", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4],
["0.0.0.0", 0, 4]
]

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