LeviLamina
Loading...
Searching...
No Matches
INetherNetTransportInterface.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nether_net/ESendType.h"
7
8// auto generated forward declare list
9// clang-format off
10namespace Bedrock::PubSub { class Subscription; }
11namespace NetherNet { class ISignalingInterface; }
12namespace NetherNet { struct ILanEventHandler; }
13namespace NetherNet { struct ISignalingEventHandler; }
14namespace NetherNet { struct NetworkID; }
15namespace NetherNet { struct SessionState; }
16namespace NetherNet { struct StunRelayServer; }
17// clang-format on
18
19namespace NetherNet {
20
22public:
23 // virtual functions
24 // NOLINTBEGIN
25 virtual ~INetherNetTransportInterface() = default;
26
27 virtual bool SendPacket(
29 uint64 connectionId,
30 ::std::string const& data,
31 ::NetherNet::ESendType eSendType
32 ) = 0;
33
34 virtual bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize) = 0;
35
36 virtual bool ReadPacket(
38 uint64 connectionId,
39 void* pubDest,
40 uint cbDest,
41 uint* pcbMessageSize
42 ) = 0;
43
44 virtual bool OpenSessionWithUser(::NetherNet::NetworkID networkIDRemote) = 0;
45
46 virtual bool CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId) = 0;
47
48 virtual bool GetSessionState(
49 ::NetherNet::NetworkID networkIDRemote,
50 uint64 connectionId,
51 ::NetherNet::SessionState* pConnectionState
52 ) = 0;
53
54 virtual void
55 SetSignalingInterface(::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface) = 0;
56
57 virtual void SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config) = 0;
58
59 virtual bool IsBroadcastDiscoveryEnabled() = 0;
60
61 virtual void EnableBroadcastDiscovery() = 0;
62
63 virtual void DisableBroadcastDiscovery() = 0;
64
65 virtual void AddLanHost(::NetherNet::NetworkID remote, ::std::string const& ip, int port) = 0;
66
67 virtual void RemoveLanHost(::NetherNet::NetworkID remote) = 0;
68
69 virtual void EnableLANSignaling() = 0;
70
71 virtual void DisableLANSignaling() = 0;
72
73 virtual void EnableTrickleIce() = 0;
74
75 virtual void DisableTrickleIce() = 0;
76
77 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler) = 0;
78
79 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ILanEventHandler* handler) = 0;
80 // NOLINTEND
81
82public:
83 // virtual function thunks
84 // NOLINTBEGIN
85
86 // NOLINTEND
87};
88
89} // namespace NetherNet
Definition Subscription.h:10
Definition INetherNetTransportInterface.h:21
Definition ISignalingInterface.h:17
Definition ILanEventHandler.h:15
Definition ISignalingEventHandler.h:12
Definition NetworkID.h:17
Definition SessionState.h:7
Definition StunRelayServer.h:7