LeviLamina
Loading...
Searching...
No Matches
PacketQueue.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/ESendType.h"
8#include "mc/deps/nether_net/ESessionError.h"
9#include "mc/external/webrtc/DataChannelObserver.h"
10#include "mc/external/webrtc/scoped_refptr.h"
11#include "mc/platform/brstd/move_only_function.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace rtc { class CopyOnWriteBuffer; }
16namespace webrtc { class DataChannelInterface; }
17namespace webrtc { struct DataBuffer; }
18// clang-format on
19
20namespace NetherNet {
21
22class PacketQueue : public ::NetherNet::ContextProxy {
23public:
24 // PacketQueue inner types declare
25 // clang-format off
26 class DataChannel;
27 // clang-format on
28
29 // PacketQueue inner types define
30 class DataChannel : public ::NetherNet::ContextProxy, public ::webrtc::DataChannelObserver {
31 public:
32 // member variables
33 // NOLINTBEGIN
40 // NOLINTEND
41
42 public:
43 // prevent constructor by default
44 DataChannel& operator=(DataChannel const&);
45 DataChannel(DataChannel const&);
46 DataChannel();
47
48 public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ~DataChannel() /*override*/;
52
53 virtual void OnStateChange() /*override*/;
54
55 virtual void OnMessage(::webrtc::DataBuffer const& buffer) /*override*/;
56
57 virtual void OnBufferedAmountChange(uint64) /*override*/;
58
59 virtual bool IsOkToCallOnTheNetworkThread() /*override*/;
60 // NOLINTEND
61
62 public:
63 // member functions
64 // NOLINTBEGIN
67 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose,
68 ::brstd::move_only_function<void(uchar const*, uint64)> onData
69 );
70
71 MCNAPI void _trySend();
72
73 MCNAPI void _updateState();
74
76
78 // NOLINTEND
79
80 public:
81 // constructor thunks
82 // NOLINTBEGIN
83 MCNAPI void* $ctor(
85 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose,
86 ::brstd::move_only_function<void(uchar const*, uint64)> onData
87 );
88 // NOLINTEND
89
90 public:
91 // destructor thunk
92 // NOLINTBEGIN
93 MCNAPI void $dtor();
94 // NOLINTEND
95
96 public:
97 // virtual function thunks
98 // NOLINTBEGIN
99 MCNAPI void $OnStateChange();
100
102
103 MCNAPI void $OnBufferedAmountChange(uint64);
104
106
107
108 // NOLINTEND
109
110 public:
111 // vftables
112 // NOLINTBEGIN
113 MCNAPI static void** $vftableForContextProxy();
114
115 MCNAPI static void** $vftableForDataChannelObserver();
116 // NOLINTEND
117 };
118
119public:
120 // member variables
121 // NOLINTBEGIN
127 // NOLINTEND
128
129public:
130 // prevent constructor by default
131 PacketQueue& operator=(PacketQueue const&);
132 PacketQueue(PacketQueue const&);
133 PacketQueue();
134
135public:
136 // member functions
137 // NOLINTBEGIN
140 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose
141 );
142
143 MCNAPI void _onOrderedPacket(uchar const* data, uint64 size);
144
145 MCNAPI void _sendFragment(uchar header, uchar const* payload, uint64 payloadSize, ::NetherNet::ESendType type);
146
147 MCNAPI ::std::optional<uint64> pop(uchar* destination, uint64 size);
148 // NOLINTEND
149
150public:
151 // constructor thunks
152 // NOLINTBEGIN
153 MCNAPI void*
154 $ctor(::NetherNet::ContextProxy const& ctx, ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose);
155 // NOLINTEND
156
157public:
158 // vftables
159 // NOLINTBEGIN
160 MCNAPI static void** $vftable();
161 // NOLINTEND
162};
163
164} // namespace NetherNet
Definition ContextProxy.h:18
Definition PacketQueue.h:30
MCAPI void $OnBufferedAmountChange(uint64)
MCAPI void send(::rtc::CopyOnWriteBuffer buffer)
MCAPI void setChannel(::webrtc::scoped_refptr<::webrtc::DataChannelInterface > channel)
MCAPI void $OnMessage(::webrtc::DataBuffer const &buffer)
MCAPI DataChannel(::NetherNet::ContextProxy const &ctx, ::brstd::move_only_function< void(::NetherNet::ESessionError)> onClose, ::brstd::move_only_function< void(uchar const *, uint64)> onData)
static MCAPI void ** $vftableForDataChannelObserver()
static MCAPI void ** $vftableForContextProxy()
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx, ::brstd::move_only_function< void(::NetherNet::ESessionError)> onClose, ::brstd::move_only_function< void(uchar const *, uint64)> onData)
MCAPI void _onOrderedPacket(uchar const *data, uint64 size)
MCAPI void _sendFragment(uchar header, uchar const *payload, uint64 payloadSize, ::NetherNet::ESendType type)
MCAPI ::std::optional< uint64 > pop(uchar *destination, uint64 size)
static MCAPI void ** $vftable()
MCAPI void * $ctor(::NetherNet::ContextProxy const &ctx, ::brstd::move_only_function< void(::NetherNet::ESessionError)> onClose)
MCAPI PacketQueue(::NetherNet::ContextProxy const &ctx, ::brstd::move_only_function< void(::NetherNet::ESessionError)> onClose)
Definition move_only_function.h:9
Definition CopyOnWriteBuffer.h:11
Definition DataChannelInterface.h:19
Definition DataChannelObserver.h:12
Definition scoped_refptr.h:8
Definition buffer.h:5
Definition ctx.h:5
Definition Alias.h:14
Definition DataBuffer.h:7