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 IIdentityAssertionGenerator; }
12namespace NetherNet { class ISignalingInterface; }
13namespace NetherNet { struct ILanEventHandler; }
14namespace NetherNet { struct ISignalingEventHandler; }
15namespace NetherNet { struct NetworkID; }
16namespace NetherNet { struct SessionState; }
17namespace NetherNet { struct StunRelayServer; }
18// clang-format on
19
20namespace NetherNet {
21
23public:
24 // virtual functions
25 // NOLINTBEGIN
26 virtual ~INetherNetTransportInterface() = default;
27
28 virtual bool SendPacket(
30 uint64 connectionId,
31 ::std::string const& data,
32 ::NetherNet::ESendType eSendType
33 ) = 0;
34
35 virtual bool IsPacketAvailable(::NetherNet::NetworkID remoteId, uint64 connectionId, uint* pcbMessageSize) = 0;
36
37 virtual bool ReadPacket(
39 uint64 connectionId,
40 void* pubDest,
41 uint cbDest,
42 uint* pcbMessageSize
43 ) = 0;
44
45 virtual bool OpenSessionWithUser(
46 ::NetherNet::NetworkID networkIDRemote,
47 ::std::shared_ptr<::NetherNet::IIdentityAssertionGenerator> identityGenerator
48 ) = 0;
49
50 virtual void
51 SetIdentityGenerator(::std::shared_ptr<::NetherNet::IIdentityAssertionGenerator> identityGenerator) = 0;
52
53 virtual bool CloseSessionWithUser(::NetherNet::NetworkID networkIDRemote, uint64 connectionId) = 0;
54
55 virtual bool GetSessionState(
56 ::NetherNet::NetworkID networkIDRemote,
57 uint64 connectionId,
58 ::NetherNet::SessionState* pConnectionState
59 ) = 0;
60
61 virtual void
62 SetSignalingInterface(::std::shared_ptr<::NetherNet::ISignalingInterface> const& pWebRTCSignalingInterface) = 0;
63
64 virtual void SetRelayConfig(::std::vector<::NetherNet::StunRelayServer> const& config) = 0;
65
66 virtual bool IsBroadcastDiscoveryEnabled() = 0;
67
68 virtual void EnableBroadcastDiscovery() = 0;
69
70 virtual void DisableBroadcastDiscovery() = 0;
71
72 virtual void AddLanHost(::NetherNet::NetworkID remote, ::std::string const& ip, int port) = 0;
73
74 virtual void RemoveLanHost(::NetherNet::NetworkID remote) = 0;
75
76 virtual void EnableLANSignaling() = 0;
77
78 virtual void DisableLANSignaling() = 0;
79
80 virtual void EnableTrickleIce() = 0;
81
82 virtual void DisableTrickleIce() = 0;
83
84 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ISignalingEventHandler* handler) = 0;
85
86 virtual ::Bedrock::PubSub::Subscription RegisterEventHandler(::NetherNet::ILanEventHandler* handler) = 0;
87 // NOLINTEND
88};
89
90} // namespace NetherNet
Definition Subscription.h:10
Definition IIdentityAssertionGenerator.h:7
Definition INetherNetTransportInterface.h:22
Definition ISignalingInterface.h:18
Definition ILanEventHandler.h:15
Definition ISignalingEventHandler.h:12
Definition NetworkID.h:17
Definition SessionState.h:7
Definition StunRelayServer.h:7