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*/ = default;
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 MCNAPI_C bool connect(::NetworkIdentifier const& id);
60
61 MCNAPI_C void connectToClient(::LocalConnector& clientConnector, ::std::shared_ptr<::LocalNetworkPeer> clientPeer);
62
63 MCNAPI void disconnect();
64
65 MCNAPI void onRemoteDisconnected(::LocalConnector& otherConnector);
66
67 MCNAPI void runEvents();
68 // NOLINTEND
69
70public:
71 // static variables
72 // NOLINTBEGIN
73 MCNAPI static ::LocalConnectivitySystem& sLocalConnectivitySystem();
74 // NOLINTEND
75
76public:
77 // constructor thunks
78 // NOLINTBEGIN
79 MCNAPI void* $ctor(::Connector::ConnectionCallbacks& callbacks, ::NetworkIdentifier const& localId);
80 // NOLINTEND
81
82public:
83 // virtual function thunks
84 // NOLINTBEGIN
85 MCNAPI ::std::string $getLocalIp();
86
87 MCNAPI ushort $getPort() const;
88
89 MCNAPI ::Social::GameConnectionInfo const& $getConnectedGameInfo() const;
90
91 MCNAPI bool $isIPv4Supported() const;
92
93 MCNAPI bool $isIPv6Supported() const;
94
95 MCNAPI ushort $getIPv4Port() const;
96
97 MCNAPI ushort $getIPv6Port() const;
98
99#ifdef LL_PLAT_C
100 MCNAPI ::TransportLayer $getNetworkType() const;
101#endif
102
103
104 // NOLINTEND
105
106public:
107 // vftables
108 // NOLINTBEGIN
109 MCNAPI static void** $vftable();
110 // NOLINTEND
111};
Definition LocalConnectivitySystem.h:5
MCAPI void * $ctor(::Connector::ConnectionCallbacks &callbacks, ::NetworkIdentifier const &localId)
MCAPI ushort $getIPv6Port() const
MCAPI bool $isIPv6Supported() const
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::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:21
Definition Connector.h:25