LeviLamina
Loading...
Searching...
No Matches
Socket.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace rtc { class SocketAddress; }
8// clang-format on
9
10namespace rtc {
11
12class Socket {
13public:
14 // Socket inner types declare
15 // clang-format off
16 struct ReceiveBuffer;
17 // clang-format on
18
19 // Socket inner types define
21 public:
22 // member variables
23 // NOLINTBEGIN
28 // NOLINTEND
29
30 public:
31 // prevent constructor by default
32 ReceiveBuffer& operator=(ReceiveBuffer const&);
35
36 public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI ~ReceiveBuffer();
40 // NOLINTEND
41
42 public:
43 // destructor thunk
44 // NOLINTBEGIN
45 MCAPI void $dtor();
46 // NOLINTEND
47 };
48
49 enum class ConnState : int {
50 Closed = 0,
51 Connecting = 1,
52 Connected = 2,
53 };
54
55 enum class Option : int {
56 Dontfragment = 0,
57 Rcvbuf = 1,
58 Sndbuf = 2,
59 Nodelay = 3,
60 Ipv6V6only = 4,
61 Dscp = 5,
62 RtpSendtimeExtnId = 6,
63 SendEcn = 7,
64 RecvEcn = 8,
65 Keepalive = 9,
66 TcpKeepcnt = 10,
67 TcpKeepidle = 11,
68 TcpKeepintvl = 12,
69 TcpUserTimeout = 13,
70 Broadcast = 14,
71 Ipv6JoinGroup = 15,
72 Ipv6MulticastLoop = 16,
73 Ipv6MulticastIf = 17,
74 };
75
76public:
77 // member variables
78 // NOLINTBEGIN
83 // NOLINTEND
84
85public:
86 // prevent constructor by default
87 Socket& operator=(Socket const&);
88 Socket(Socket const&);
89 Socket();
90
91public:
92 // virtual functions
93 // NOLINTBEGIN
94 // vIndex: 0
95 virtual ~Socket();
96
97 // vIndex: 1
98 virtual ::rtc::SocketAddress GetLocalAddress() const = 0;
99
100 // vIndex: 2
101 virtual ::rtc::SocketAddress GetRemoteAddress() const = 0;
102
103 // vIndex: 3
104 virtual int Bind(::rtc::SocketAddress const&) = 0;
105
106 // vIndex: 4
107 virtual int Connect(::rtc::SocketAddress const&) = 0;
108
109 // vIndex: 5
110 virtual int Send(void const*, uint64) = 0;
111
112 // vIndex: 6
113 virtual int SendTo(void const*, uint64, ::rtc::SocketAddress const&) = 0;
114
115 // vIndex: 7
116 virtual int Recv(void*, uint64, int64*) = 0;
117
118 // vIndex: 9
119 virtual int RecvFrom(void* pv, uint64 cb, ::rtc::SocketAddress* paddr, int64* timestamp);
120
121 // vIndex: 8
122 virtual int RecvFrom(::rtc::Socket::ReceiveBuffer&);
123
124 // vIndex: 10
125 virtual int Listen(int) = 0;
126
127 // vIndex: 11
128 virtual ::rtc::Socket* Accept(::rtc::SocketAddress*) = 0;
129
130 // vIndex: 12
131 virtual int Close() = 0;
132
133 // vIndex: 13
134 virtual int GetError() const = 0;
135
136 // vIndex: 14
137 virtual void SetError(int) = 0;
138
139 // vIndex: 15
140 virtual ::rtc::Socket::ConnState GetState() const = 0;
141
142 // vIndex: 16
143 virtual int GetOption(::rtc::Socket::Option, int*) = 0;
144
145 // vIndex: 17
146 virtual int SetOption(::rtc::Socket::Option, int) = 0;
147 // NOLINTEND
148
149public:
150 // destructor thunk
151 // NOLINTBEGIN
152 MCAPI void $dtor();
153 // NOLINTEND
154
155public:
156 // virtual function thunks
157 // NOLINTBEGIN
158 MCFOLD int $RecvFrom(void* pv, uint64 cb, ::rtc::SocketAddress* paddr, int64* timestamp);
159 // NOLINTEND
160
161public:
162 // vftables
163 // NOLINTBEGIN
164 MCAPI static void** $vftable();
165 // NOLINTEND
166};
167
168} // namespace rtc
Definition Option.h:17
Definition SocketAddress.h:12
Definition Socket.h:12
Definition Alias.h:14
Definition Socket.h:20