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
20 enum class ConnState : int {
21 Closed = 0,
22 Connecting = 1,
23 Connected = 2,
24 };
25
26 enum class Option : int {
27 Dontfragment = 0,
28 Rcvbuf = 1,
29 Sndbuf = 2,
30 Nodelay = 3,
31 Ipv6V6only = 4,
32 Dscp = 5,
33 RtpSendtimeExtnId = 6,
34 SendEcn = 7,
35 RecvEcn = 8,
36 Keepalive = 9,
37 TcpKeepcnt = 10,
38 TcpKeepidle = 11,
39 TcpKeepintvl = 12,
40 TcpUserTimeout = 13,
41 Broadcast = 14,
42 Ipv6JoinGroup = 15,
43 Ipv6MulticastLoop = 16,
44 Ipv6MulticastIf = 17,
45 };
46
47 struct ReceiveBuffer {
48 public:
49 // member variables
50 // NOLINTBEGIN
55 // NOLINTEND
56
57 public:
58 // prevent constructor by default
59 ReceiveBuffer& operator=(ReceiveBuffer const&);
60 ReceiveBuffer(ReceiveBuffer const&);
61 ReceiveBuffer();
62
63 public:
64 // member functions
65 // NOLINTBEGIN
67 // NOLINTEND
68
69 public:
70 // destructor thunk
71 // NOLINTBEGIN
72 MCNAPI void $dtor();
73 // NOLINTEND
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 virtual ~Socket();
95
96 virtual ::rtc::SocketAddress GetLocalAddress() const = 0;
97
98 virtual ::rtc::SocketAddress GetRemoteAddress() const = 0;
99
100 virtual int Bind(::rtc::SocketAddress const&) = 0;
101
102 virtual int Connect(::rtc::SocketAddress const&) = 0;
103
104 virtual int Send(void const*, uint64) = 0;
105
106 virtual int SendTo(void const*, uint64, ::rtc::SocketAddress const&) = 0;
107
108 virtual int Recv(void*, uint64, int64*) = 0;
109
110 virtual int RecvFrom(void* pv, uint64 cb, ::rtc::SocketAddress* paddr, int64* timestamp);
111
112 virtual int RecvFrom(::rtc::Socket::ReceiveBuffer& buffer);
113
114 virtual int Listen(int) = 0;
115
116 virtual ::rtc::Socket* Accept(::rtc::SocketAddress*) = 0;
117
118 virtual int Close() = 0;
119
120 virtual int GetError() const = 0;
121
122 virtual void SetError(int) = 0;
123
124 virtual ::rtc::Socket::ConnState GetState() const = 0;
125
126 virtual int GetOption(::rtc::Socket::Option opt, int* value) = 0;
127
128 virtual int SetOption(::rtc::Socket::Option, int) = 0;
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134 MCNAPI void $dtor();
135 // NOLINTEND
136
137public:
138 // virtual function thunks
139 // NOLINTBEGIN
140 MCNAPI int $RecvFrom(void* pv, uint64 cb, ::rtc::SocketAddress* paddr, int64* timestamp);
141
143
144
145 // NOLINTEND
146
147public:
148 // vftables
149 // NOLINTBEGIN
150 MCNAPI static void** $vftable();
151 // NOLINTEND
152};
153
154} // namespace rtc
Definition SocketAddress.h:12
MCAPI int $RecvFrom(void *pv, uint64 cb, ::rtc::SocketAddress *paddr, int64 *timestamp)
MCAPI void $dtor()
MCAPI int $RecvFrom(::rtc::Socket::ReceiveBuffer &buffer)
static MCAPI void ** $vftable()
Definition buffer.h:5
Definition Alias.h:14
Definition Socket.h:47