Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
handshake.h
Go to the documentation of this file.
1
12#ifndef MINESERVER_HANDSHAKE_H
13#define MINESERVER_HANDSHAKE_H
14
15#include <types/clientstate.h>
16#include <net/packet.h>
17#include <plugins/luaheaders.h>
18
26{
27protected:
36 void write(IMCStream *stream) override;
37
38public:
48 ~HandshakePacket() override = default;
49
63 std::string serverAddress;
70 unsigned short serverPort{};
79
86 void read(IMCStream *stream) override;
87
94 static void loadLua(lua_State* state, const char* baseNamespaceName);
95};
96
97#endif // MINESERVER_HANDSHAKE_H
Handshake Packet.
Definition handshake.h:26
~HandshakePacket() override=default
Destroy the Handshake Packet object.
ClientState nextState
Next State.
Definition handshake.h:78
void read(IMCStream *stream) override
Read Packet Data.
Definition handshake.cpp:23
int protocolVersion
Protocol Version.
Definition handshake.h:56
HandshakePacket()
Construct a new Handshake Packet object.
Definition handshake.h:43
void write(IMCStream *stream) override
Write Packet Data.
Definition handshake.cpp:16
static void loadLua(lua_State *state, const char *baseNamespaceName)
Loads packet as lua class.
Definition handshake.cpp:31
std::string serverAddress
Server Address.
Definition handshake.h:63
unsigned short serverPort
Server Port.
Definition handshake.h:70
Stream interface.
Definition stream.h:32
Interface for all Packets.
Definition packet.h:25
The file containing just the enum of client state.
ClientState
Client State.
Definition clientstate.h:31
@ HANDSHAKE
Handshake state.
Definition clientstate.h:39
Utility header file for lua things.
The file containing the packet data.