LeviLamina
Loading...
Searching...
No Matches
LocalConnector.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/network/Connector.h"
7#include "mc/network/NetworkIdentifier.h"
8#include "mc/network/TransportLayer.h"
9#include "mc/platform/threading/Mutex.h"
10
11// auto generated forward declare list
12// clang-format off
15namespace Social { class GameConnectionInfo; }
16// clang-format on
17
18class LocalConnector : public ::Connector {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mMutex;
23 ::ll::TypedStorage<8, 176, ::NetworkIdentifier> mLocalId;
24 ::ll::TypedStorage<8, 16, ::std::set<::LocalConnector*>> mConnections;
25 ::ll::TypedStorage<8, 24, ::std::vector<::std::function<void()>>> mCallbackQueue;
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 LocalConnector();
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual ~LocalConnector() /*override*/;
36
37 virtual ::std::string getLocalIp() /*override*/;
38
39 virtual ushort getPort() const /*override*/;
40
41 virtual ::Social::GameConnectionInfo const& getConnectedGameInfo() const /*override*/;
42
43 virtual bool isIPv4Supported() const /*override*/;
44
45 virtual bool isIPv6Supported() const /*override*/;
46
47 virtual ushort getIPv4Port() const /*override*/;
48
49 virtual ushort getIPv6Port() const /*override*/;
50
51 virtual ::TransportLayer getNetworkType() const /*override*/;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
58
59#ifdef LL_PLAT_C
60 MCNAPI bool connect(::NetworkIdentifier const& id);
61
62 MCNAPI void connectToClient(::LocalConnector& clientConnector, ::std::shared_ptr<::LocalNetworkPeer> clientPeer);
63#endif
64
65 MCNAPI void disconnect();
66
67 MCNAPI void host(::NetworkIdentifier const& id);
68
69 MCNAPI void onRemoteDisconnected(::LocalConnector& otherConnector);
70
71 MCNAPI void runEvents();
72 // NOLINTEND
73
74public:
75 // static variables
76 // NOLINTBEGIN
77 MCNAPI static ::LocalConnectivitySystem& sLocalConnectivitySystem();
78 // NOLINTEND
79
80public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCNAPI void* $ctor(::Connector::ConnectionCallbacks& callbacks, ::NetworkIdentifier const& localId);
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCNAPI void $dtor();
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCNAPI ::std::string $getLocalIp();
96
97 MCNAPI ushort $getPort() const;
98
99 MCNAPI ::Social::GameConnectionInfo const& $getConnectedGameInfo() const;
100
101 MCNAPI bool $isIPv4Supported() const;
102
103 MCNAPI bool $isIPv6Supported() const;
104
105 MCNAPI ushort $getIPv4Port() const;
106
107 MCNAPI ushort $getIPv6Port() const;
108
109 MCNAPI ::TransportLayer $getNetworkType() const;
110
111
112 // NOLINTEND
113
114public:
115 // vftables
116 // NOLINTBEGIN
117 MCNAPI static void** $vftable();
118 // NOLINTEND
119};
Definition LocalConnectivitySystem.h:5
MCAPI void * $ctor(::Connector::ConnectionCallbacks &callbacks, ::NetworkIdentifier const &localId)
MCAPI ushort $getIPv6Port() const
MCAPI void $dtor()
MCAPI bool $isIPv6Supported() const
MCAPI void host(::NetworkIdentifier const &id)
MCAPI bool $isIPv4Supported() const
MCAPI void disconnect()
MCAPI LocalConnector(::Connector::ConnectionCallbacks &callbacks, ::NetworkIdentifier const &localId)
MCAPI void runEvents()
MCAPI ushort $getIPv4Port() const
MCAPI ushort $getPort() const
MCAPI::TransportLayer $getNetworkType() const
MCAPI::std::string $getLocalIp()
static MCAPI void ** $vftable()
MCAPI void onRemoteDisconnected(::LocalConnector &otherConnector)
MCAPI::Social::GameConnectionInfo const & $getConnectedGameInfo() const
static MCAPI ::LocalConnectivitySystem & sLocalConnectivitySystem()
Definition LocalNetworkPeer.h:9
Definition NetworkIdentifier.h:10
Definition GameConnectionInfo.h:23
Definition Connector.h:25