Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
TCPPort.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/external/webrtc/Port.h"
7#include "mc/external/webrtc/PortInterface.h"
8#include "mc/external/webrtc/ProtocolType.h"
9#include "mc/external/webrtc/Socket.h"
10
11// auto generated forward declare list
12// clang-format off
13namespace webrtc { class AsyncListenSocket; }
14namespace webrtc { class AsyncPacketSocket; }
15namespace webrtc { class Candidate; }
16namespace webrtc { class Connection; }
17namespace webrtc { class SocketAddress; }
18namespace webrtc { struct AsyncSocketPacketOptions; }
19namespace webrtc { struct SentPacketInfo; }
20// clang-format on
21
22namespace webrtc {
23
24class TCPPort : public ::webrtc::Port {
25public:
26 // TCPPort inner types declare
27 // clang-format off
28 struct Incoming;
29 // clang-format on
30
31 // TCPPort inner types define
32 struct Incoming {
33 public:
34 // member variables
35 // NOLINTBEGIN
38 // NOLINTEND
39
40 public:
41 // prevent constructor by default
42 Incoming& operator=(Incoming const&);
43 Incoming(Incoming const&);
44 Incoming();
45
46 public:
47 // member functions
48 // NOLINTBEGIN
49 MCNAPI ~Incoming();
50 // NOLINTEND
51
52 public:
53 // destructor thunk
54 // NOLINTBEGIN
55 MCNAPI void $dtor();
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
67 // NOLINTEND
68
69public:
70 // prevent constructor by default
71 TCPPort& operator=(TCPPort const&);
72 TCPPort(TCPPort const&);
73 TCPPort();
74
75public:
76 // virtual functions
77 // NOLINTBEGIN
78 virtual ~TCPPort() /*override*/ = default;
79
80 virtual ::webrtc::Connection*
81 CreateConnection(::webrtc::Candidate const& address, ::webrtc::PortInterface::CandidateOrigin origin) /*override*/;
82
83 virtual void PrepareAddress() /*override*/;
84
85 virtual int GetOption(::webrtc::Socket::Option opt, int* value) /*override*/;
86
87 virtual int SetOption(::webrtc::Socket::Option opt, int value) /*override*/;
88
89 virtual int GetError() /*override*/;
90
91 virtual bool SupportsProtocol(::std::string_view protocol) const /*override*/;
92
93 virtual ::webrtc::ProtocolType GetProtocol() const /*override*/;
94
95 virtual int SendTo(
96 void const* data,
97 uint64 size,
98 ::webrtc::SocketAddress const& addr,
99 ::webrtc::AsyncSocketPacketOptions const& options,
100 bool payload
101 ) /*override*/;
102
103 virtual void
104 OnSentPacket(::webrtc::AsyncPacketSocket* socket, ::webrtc::SentPacketInfo const& sent_packet) /*override*/;
105 // NOLINTEND
106
107public:
108 // member functions
109 // NOLINTBEGIN
110 MCNAPI ::webrtc::AsyncPacketSocket* GetIncoming(::webrtc::SocketAddress const& addr, bool remove);
111
112 MCNAPI void OnNewConnection(::webrtc::AsyncListenSocket* socket, ::webrtc::AsyncPacketSocket* new_socket);
113
114 MCNAPI void OnReadyToSend(::webrtc::AsyncPacketSocket* socket);
115
116 MCNAPI TCPPort(::webrtc::Port::PortParametersRef const& args, ushort min_port, ushort max_port, bool allow_listen);
117
119 // NOLINTEND
120
121public:
122 // constructor thunks
123 // NOLINTBEGIN
124 MCNAPI void*
125 $ctor(::webrtc::Port::PortParametersRef const& args, ushort min_port, ushort max_port, bool allow_listen);
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131 MCNAPI ::webrtc::Connection*
132 $CreateConnection(::webrtc::Candidate const& address, ::webrtc::PortInterface::CandidateOrigin origin);
133
134 MCNAPI void $PrepareAddress();
135
136 MCNAPI int $GetOption(::webrtc::Socket::Option opt, int* value);
137
138 MCNAPI int $SetOption(::webrtc::Socket::Option opt, int value);
139
140 MCNAPI int $GetError();
141
142 MCNAPI bool $SupportsProtocol(::std::string_view protocol) const;
143
144 MCNAPI ::webrtc::ProtocolType $GetProtocol() const;
145
146 MCNAPI int $SendTo(
147 void const* data,
148 uint64 size,
149 ::webrtc::SocketAddress const& addr,
150 ::webrtc::AsyncSocketPacketOptions const& options,
151 bool payload
152 );
153
154 MCNAPI void $OnSentPacket(::webrtc::AsyncPacketSocket* socket, ::webrtc::SentPacketInfo const& sent_packet);
155
156
157 // NOLINTEND
158
159public:
160 // vftables
161 // NOLINTBEGIN
162 MCNAPI static void** $vftableForPortInterface();
163
164 MCNAPI static void** $vftableForHasSlots();
165 // NOLINTEND
166};
167
168} // namespace webrtc
Definition Option.h:22
Definition AsyncListenSocket.h:16
Definition AsyncPacketSocket.h:20
Definition Candidate.h:12
Definition Connection.h:35
Definition PortInterface.h:29
Definition Port.h:37
Definition SocketAddress.h:11
Definition Socket.h:12
MCAPI void TryCreateServerSocket()
MCAPI::webrtc::Connection * $CreateConnection(::webrtc::Candidate const &address, ::webrtc::PortInterface::CandidateOrigin origin)
MCAPI::webrtc::AsyncPacketSocket * GetIncoming(::webrtc::SocketAddress const &addr, bool remove)
MCAPI int $SendTo(void const *data, uint64 size, ::webrtc::SocketAddress const &addr, ::webrtc::AsyncSocketPacketOptions const &options, bool payload)
MCAPI bool $SupportsProtocol(::std::string_view protocol) const
MCAPI::webrtc::ProtocolType $GetProtocol() const
MCAPI void $OnSentPacket(::webrtc::AsyncPacketSocket *socket, ::webrtc::SentPacketInfo const &sent_packet)
static MCAPI void ** $vftableForPortInterface()
MCAPI int $GetError()
MCAPI void $PrepareAddress()
MCAPI void OnNewConnection(::webrtc::AsyncListenSocket *socket, ::webrtc::AsyncPacketSocket *new_socket)
MCAPI int $GetOption(::webrtc::Socket::Option opt, int *value)
MCAPI void * $ctor(::webrtc::Port::PortParametersRef const &args, ushort min_port, ushort max_port, bool allow_listen)
static MCAPI void ** $vftableForHasSlots()
MCAPI void OnReadyToSend(::webrtc::AsyncPacketSocket *socket)
MCAPI int $SetOption(::webrtc::Socket::Option opt, int value)
STL namespace.
Definition Alias.h:14
Definition AsyncSocketPacketOptions.h:10
Definition SentPacketInfo.h:12
Definition TCPPort.h:32