LeviLamina
Loading...
Searching...
No Matches
PacketSocketFactory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace webrtc { class AsyncDnsResolverInterface; }
8namespace webrtc { class AsyncListenSocket; }
9namespace webrtc { class AsyncPacketSocket; }
10namespace webrtc { class SocketAddress; }
11namespace webrtc { struct PacketSocketTcpOptions; }
12// clang-format on
13
14namespace webrtc {
15
17public:
18 // PacketSocketFactory inner types define
19 enum class Options : int {
20 // bitfield representation
21 TlsFake = 1 << 0,
22 Ssltcp = 1 << 0,
23 Tls = 1 << 1,
24 Stun = 1 << 2,
25 TlsInsecure = 1 << 3,
26 };
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ~PacketSocketFactory() = default;
32
33 virtual ::std::unique_ptr<::webrtc::AsyncPacketSocket>
34 CreateUdpSocket(::webrtc::SocketAddress const& address, ushort min_port, ushort max_port) = 0;
35
36 virtual ::std::shared_ptr<::webrtc::AsyncPacketSocket>
37 CreateGlobalUdpSocket(::webrtc::SocketAddress const& address, ushort min_port, ushort max_port) = 0;
38
39 virtual ::std::unique_ptr<::webrtc::AsyncListenSocket>
40 CreateServerTcpSocket(::webrtc::SocketAddress const& local_address, ushort min_port, ushort max_port, int opts) = 0;
41
42 virtual ::std::unique_ptr<::webrtc::AsyncPacketSocket> CreateClientTcpSocket(
43 ::webrtc::SocketAddress const& local_address,
44 ::webrtc::SocketAddress const& remote_address,
45 ::webrtc::PacketSocketTcpOptions const& tcp_options
46 ) = 0;
47
48 virtual ::std::unique_ptr<::webrtc::AsyncDnsResolverInterface> CreateAsyncDnsResolver() = 0;
49 // NOLINTEND
50};
51
52} // namespace webrtc
Definition AsyncDnsResolverInterface.h:16
Definition AsyncListenSocket.h:16
Definition AsyncPacketSocket.h:20
Definition PacketSocketFactory.h:16
Definition SocketAddress.h:15
Definition PacketSocketTcpOptions.h:7