-
Notifications
You must be signed in to change notification settings - Fork 1
/
BEClient.h
54 lines (41 loc) · 1.54 KB
/
BEClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#pragma once
#include <cstdint>
namespace BE {
enum instanceStatus {
NONE,
NOT_INITIALIZED,
SUCCESSFULLY_INITIALIZED,
DESTROYING,
DESTROYED
};
struct beclGameData {
char* game_version;
std::uint32_t addy;
std::uint16_t port;
// FUNCTIONS
using print_message_t = void(*)(char* msg);
print_message_t printMessage;
using request_restart_t = void(*)(std::uint32_t reason);
request_restart_t requestRestart;
using send_packet_t = void(*)(void* packet, std::uint32_t length);
send_packet_t sendPacket;
using disconnect_peer_t = void(*)(std::uint8_t guid, std::uint32_t guid_length, char* reason);
disconnect_peer_t disconnectPeer;
};
struct beclBEData {
using exit_t = bool(*)();
exit_t exit;
using run_t = void(*)();
run_t run;
using command_t = void(*)(char* command);
command_t command;
using received_packet_t = void(*)(std::uint8_t* receivedPacket, std::uint32_t length);
received_packet_t receivedPacket;
using on_receive_auth_ticket_t = void(*)(std::uint8_t* ticket, std::uint32_t length);
on_receive_auth_ticket_t onReceiveAuthTicket;
using add_peer_t = void(*)(std::uint8_t guid, std::uint32_t guidLength);
add_peer_t addPeer;
using remove_peer_t = void(*)(std::uint8_t guid, std::uint32_t guidLength);
remove_peer_t removePeer;
};
}