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 webrtc { 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 struct PartialReceive;
28 // clang-format on
29
30 // PacketQueue inner types define
31 class DataChannel : public ::NetherNet::ContextProxy, public ::webrtc::DataChannelObserver {
32 public:
33 // member variables
34 // NOLINTBEGIN
41 // NOLINTEND
42
43 public:
44 // prevent constructor by default
45 DataChannel& operator=(DataChannel const&);
46 DataChannel(DataChannel const&);
47 DataChannel();
48
49 public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual ~DataChannel() /*override*/ = default;
53
54 virtual void OnStateChange() /*override*/;
55
56 virtual void OnMessage(::webrtc::DataBuffer const& buffer) /*override*/;
57
58 virtual void OnBufferedAmountChange(uint64) /*override*/;
59
60 virtual bool IsOkToCallOnTheNetworkThread() /*override*/;
61 // NOLINTEND
62
63 public:
64 // member functions
65 // NOLINTBEGIN
68 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose,
69 ::brstd::move_only_function<void(uchar const*, uint64)> onData
70 );
71
72 MCNAPI void _trySend();
73
75
77 // NOLINTEND
78
79 public:
80 // constructor thunks
81 // NOLINTBEGIN
82 MCNAPI void* $ctor(
84 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose,
85 ::brstd::move_only_function<void(uchar const*, uint64)> onData
86 );
87 // NOLINTEND
88
89 public:
90 // virtual function thunks
91 // NOLINTBEGIN
92 MCNAPI void $OnStateChange();
93
95
96 MCNAPI void $OnBufferedAmountChange(uint64);
97
99
100
101 // NOLINTEND
102 };
103
104 struct PartialReceive {
105 public:
106 // member variables
107 // NOLINTBEGIN
110 // NOLINTEND
111
112 public:
113 // prevent constructor by default
114 PartialReceive& operator=(PartialReceive const&);
115 PartialReceive(PartialReceive const&);
116 PartialReceive();
117 };
118
119public:
120 // member variables
121 // NOLINTBEGIN
128 // NOLINTEND
129
130public:
131 // prevent constructor by default
132 PacketQueue& operator=(PacketQueue const&);
133 PacketQueue(PacketQueue const&);
134 PacketQueue();
135
136public:
137 // member functions
138 // NOLINTBEGIN
141 ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose
142 );
143
144 MCNAPI void _sendFragment(uchar header, uchar const* payload, uint64 payloadSize, ::NetherNet::ESendType type);
145 // NOLINTEND
146
147public:
148 // constructor thunks
149 // NOLINTBEGIN
150 MCNAPI void*
151 $ctor(::NetherNet::ContextProxy const& ctx, ::brstd::move_only_function<void(::NetherNet::ESessionError)> onClose);
152 // NOLINTEND
153};
154
155} // namespace NetherNet
Definition ContextProxy.h:18
Definition PacketQueue.h:31
MCAPI void $OnBufferedAmountChange(uint64)
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)
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 send(::webrtc::CopyOnWriteBuffer buffer)
MCAPI void _sendFragment(uchar header, uchar const *payload, uint64 payloadSize, ::NetherNet::ESendType type)
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 PacketQueue.h:104
Definition buffer.h:5
Definition ctx.h:5
Definition Alias.h:14
Definition DataBuffer.h:7