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
26 lines
395 B
C++
26 lines
395 B
C++
#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
|