|
Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
|
Handshake Packet. More...
#include <handshake.h>
Public Member Functions | |
| HandshakePacket () | |
| Construct a new Handshake Packet object. | |
| ~HandshakePacket () override=default | |
| Destroy the Handshake 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 packet as lua class. | |
Public Attributes | |
| int | protocolVersion {} |
| Protocol Version. | |
| std::string | serverAddress |
| Server Address. | |
| unsigned short | serverPort {} |
| Server Port. | |
| ClientState | nextState = ClientState::HANDSHAKE |
| Next State. | |
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. | |
Handshake Packet.
First packet that is read by the server from the client. No writing should be involved.
Loads packet as lua class.
| state | lua state to load to |
| baseNamespaceName | the base namespace name to load to |
Read Packet Data.
Reads handshake data from the stream
| stream | the stream to read from |
Implements IPacket.
Write Packet Data.
Should not be called ! Handshake packet should only be read, not written to !
| stream | the stream to write to |
Implements IPacket.
| ClientState HandshakePacket::nextState = ClientState::HANDSHAKE |
Next State.
The next state that the client is asking to do, 1 for status, 2 for login.
| int HandshakePacket::protocolVersion {} |
Protocol Version.
The protocol version of the client connecting to the server.
| std::string HandshakePacket::serverAddress |
Server Address.
The server address that the client used to connect to the server.
Server Port.
The port that the client used to connect to the server.