LeviLamina
Loading...
Searching...
No Matches
AsyncPacketSocket.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/absl/AnyInvocable.h"
7#include "mc/external/rtc/Socket.h"
8#include "mc/external/sigslot/has_slots.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace rtc { class ReceivedPacket; }
13namespace rtc { class SocketAddress; }
14namespace rtc { struct PacketOptions; }
15namespace sigslot { class single_threaded; }
16// clang-format on
17
18namespace rtc {
19
20class AsyncPacketSocket : public ::sigslot::has_slots<::sigslot::single_threaded> {
21public:
22 // AsyncPacketSocket inner types define
23 enum class State : int {
24 Closed = 0,
25 Binding = 1,
26 Bound = 2,
27 Connecting = 3,
28 Connected = 4,
29 };
30
31public:
32 // member variables
33 // NOLINTBEGIN
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 AsyncPacketSocket& operator=(AsyncPacketSocket const&);
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 // vIndex: 0
52 virtual ~AsyncPacketSocket() /*override*/ = default;
53
54 // vIndex: 1
55 virtual ::rtc::SocketAddress GetLocalAddress() const = 0;
56
57 // vIndex: 2
58 virtual ::rtc::SocketAddress GetRemoteAddress() const = 0;
59
60 // vIndex: 3
61 virtual int Send(void const*, uint64, ::rtc::PacketOptions const&) = 0;
62
63 // vIndex: 4
64 virtual int SendTo(void const*, uint64, ::rtc::SocketAddress const&, ::rtc::PacketOptions const&) = 0;
65
66 // vIndex: 5
67 virtual int Close() = 0;
68
69 // vIndex: 6
70 virtual ::rtc::AsyncPacketSocket::State GetState() const = 0;
71
72 // vIndex: 7
73 virtual int GetOption(::rtc::Socket::Option, int*) = 0;
74
75 // vIndex: 8
76 virtual int SetOption(::rtc::Socket::Option, int) = 0;
77
78 // vIndex: 9
79 virtual int GetError() const = 0;
80
81 // vIndex: 10
82 virtual void SetError(int) = 0;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI AsyncPacketSocket();
89
90 MCAPI void DeregisterReceivedPacketCallback();
91
92 MCAPI void NotifyPacketReceived(::rtc::ReceivedPacket const&);
93
94 MCAPI void RegisterReceivedPacketCallback(::absl::AnyInvocable<
96
97 MCAPI void SubscribeCloseEvent(void const*, ::std::function<void(::rtc::AsyncPacketSocket*, int)>);
98
99 MCAPI void UnsubscribeCloseEvent(void const*);
100 // NOLINTEND
101
102public:
103 // constructor thunks
104 // NOLINTBEGIN
105 MCAPI void* $ctor();
106 // NOLINTEND
107
108public:
109 // destructor thunk
110 // NOLINTBEGIN
111
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCAPI static void** $vftable();
124 // NOLINTEND
125};
126
127} // namespace rtc
Definition AnyInvocable.h:8
Definition AsyncPacketSocket.h:20
Definition ReceivedPacket.h:16
Definition SocketAddress.h:12
Definition has_slots.h:8
Definition Alias.h:14
Definition PacketOptions.h:10