LeviLamina
Loading...
Searching...
No Matches
LanThreadManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ContextProxy.h"
7#include "mc/deps/nether_net/Controller.h"
8#include "mc/external/rtc/Thread.h"
9#include "mc/external/sigslot/has_slots.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace NetherNet { struct DiscoveryResponsePacket; }
14namespace NetherNet { struct NetworkID; }
15namespace NetherNet { struct ThreadInit; }
16namespace rtc { class AsyncPacketSocket; }
17namespace rtc { class ReceivedPacket; }
18namespace rtc { class SocketAddress; }
19namespace sigslot { class single_threaded; }
20// clang-format on
21
22namespace NetherNet {
23
26 public ::rtc::Thread,
27 public ::sigslot::has_slots<::sigslot::single_threaded> {
28public:
29 // member variables
30 // NOLINTBEGIN
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
47 LanThreadManager& operator=(LanThreadManager const&);
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 // vIndex: 3
55 virtual ~LanThreadManager() /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI void BeginNetworkDiscovery();
62
63 MCAPI void BroadcastTask();
64
65 MCAPI void CreateEncryptedBroadcastSocket();
66
67 MCAPI void DestroyLanResources();
68
69 MCAPI void DisableBroadcastDiscovery(::NetherNet::NetworkID id);
70
71 MCAPI void EnableBroadcastDiscovery(::NetherNet::NetworkID id);
72
73 MCAPI void Initialize(
74 char const* threadInit,
75 ::NetherNet::ThreadInit const& applicationId,
76 uint64 port,
77 ushort interval,
78 ::std::chrono::milliseconds threadName
79 );
80
81 MCAPI bool IsBroadcastDiscoveryEnabled(::NetherNet::NetworkID id);
82
83 MCAPI explicit LanThreadManager(::NetherNet::ContextProxy const& ctx);
84
85 MCAPI void OnNetworkDiscoveryComplete();
86
87 MCAPI void OnPacket(::rtc::AsyncPacketSocket* packet, ::rtc::ReceivedPacket const&);
88
89 MCAPI void SendLanBroadcastRequest(::std::unique_ptr<::rtc::AsyncPacketSocket>& socket, ::NetherNet::NetworkID id);
90
91 MCAPI void SendLanBroadcastResponse(
92 ::rtc::SocketAddress const& destination,
94 );
95
96 MCAPI void SendSignalingMessageTo(
97 ::NetherNet::NetworkID networkIdFrom,
98 ::NetherNet::NetworkID networkIdTo,
99 ::std::string const& message
100 );
101
102 MCAPI void SendSignalingMessageTo(
103 ::std::unique_ptr<::rtc::AsyncPacketSocket>& socket,
104 ::NetherNet::NetworkID networkIdFrom,
105 ::NetherNet::NetworkID networkIdTo,
106 ::std::string const& message
107 );
108
109 MCAPI ::std::error_code SendToHelper(
110 ::std::unique_ptr<::rtc::AsyncPacketSocket>& socket,
111 void const* data,
112 uint64 size,
113 ::rtc::SocketAddress const& addr
114 );
115
116 MCAPI void Shutdown();
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122 MCAPI void* $ctor(::NetherNet::ContextProxy const& ctx);
123 // NOLINTEND
124
125public:
126 // destructor thunk
127 // NOLINTBEGIN
128 MCAPI void $dtor();
129 // NOLINTEND
130
131public:
132 // vftables
133 // NOLINTBEGIN
134 MCAPI static void** $vftableForHasSlots();
135
136 MCAPI static void** $vftableForThread();
137
138 MCAPI static void** $vftableForContextProxy();
139 // NOLINTEND
140};
141
142} // namespace NetherNet
Definition ContextProxy.h:18
Definition LanThreadManager.h:27
Definition Controller.h:7
Definition AsyncPacketSocket.h:20
Definition ReceivedPacket.h:16
Definition SocketAddress.h:12
Definition Thread.h:20
Definition has_slots.h:8
Definition DiscoveryResponsePacket.h:10
Definition NetworkID.h:7
Definition ThreadInit.h:7
Definition ctx.h:5
Definition Alias.h:14