forked from Xenomega/EchoRelay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameserver.h
63 lines (46 loc) · 1.64 KB
/
gameserver.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
55
56
57
58
59
60
61
62
63
#pragma once
#include "pch.h"
#include "echovr.h"
/// <summary>
/// A symbol representing the game server's special websocket service.
/// </summary>
const EchoVR::SymbolId SYMBOL_GAMESERVER_DB = 0x25E886012CED8064;
/// <summary>
/// A game server library implementation which connects to EchoRelay's ServerDB implementation.
/// </summary>
class GameServerLib : public EchoVR::IServerLib {
public:
INT64 UnkFunc0(VOID* unk1, INT64 a2, INT64 a3);
VOID* Initialize(EchoVR::Lobby* lobby, EchoVR::Broadcaster* broadcaster, VOID* unk2, const CHAR* logPath);
VOID Terminate();
VOID Update();
VOID UnkFunc1(UINT64 unk);
VOID RequestRegistration(INT64 serverId, CHAR* radId, EchoVR::SymbolId regionId, EchoVR::SymbolId lockedVersion, const EchoVR::Json* localConfig);
VOID Unregister();
VOID EndSession();
VOID LockPlayerSessions();
VOID UnlockPlayerSessions();
VOID AcceptPlayerSessions(EchoVR::Array<GUID>* playerUuids);
VOID RemovePlayerSession(GUID* playerUuid);
// Game related fields
EchoVR::Lobby* lobby;
EchoVR::Broadcaster* broadcaster;
EchoVR::TcpBroadcasterData* tcpBroadcasterData;
// ServerDB related fields
EchoVR::TcpPeer serverDbPeer;
BOOL registered;
// Session related fields.
BOOL sessionActive;
UINT64 serverId;
EchoVR::SymbolId regionId;
EchoVR::SymbolId versionLock;
// Callbacks
UINT16 broadcastSessionStartCBHandle;
UINT16 broadcastSessionErrorCBHandle;
UINT16 tcpBroadcastRegSuccessCBHandle;
UINT16 tcpBroadcastRegFailureCBHandle;
UINT16 tcpBroadcastStartSessionCBHandle;
UINT16 tcpBroadcastPlayersAcceptedCBHandle;
UINT16 tcpBroadcastPlayersRejectedCBHandle;
UINT16 tcpBroadcastSessionSuccessCBHandle;
};