Added Handshake class
Fixed NetworkBuffer include Fixed some data types TcpClient: Added SendBytes, SetOnDisconnectCallback, SetOnConnectCallback, SetOnMessageCallback methods and made callback std::function's private and fixed some method implementations Added AcceptConnection on TcpServer Fixed TcpServer AddToClientsList
This commit is contained in:
25
include/Handshake.hpp
Normal file
25
include/Handshake.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef HANDSHAKE_HPP
|
||||
#define HANDSHAKE_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "Defs.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct Handshake
|
||||
{
|
||||
Handshake();
|
||||
Handshake(uint16 id, byte con_code);
|
||||
~Handshake();
|
||||
|
||||
static const std::vector<byte> &EncodeHandshake(const Handshake &handshake);
|
||||
static Handshake &DecodeHandshake(const std::vector<byte> &bytes);
|
||||
|
||||
uint16 id;
|
||||
byte con_code;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user