]> git.proxmox.com Git - rustc.git/blob - vendor/windows-sys/src/Windows/Networking/Sockets/mod.rs
New upstream version 1.63.0+dfsg1
[rustc.git] / vendor / windows-sys / src / Windows / Networking / Sockets / mod.rs
1 #[repr(C)]
2 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
3 pub struct BandwidthStatistics {
4 pub OutboundBitsPerSecond: u64,
5 pub InboundBitsPerSecond: u64,
6 pub OutboundBitsPerSecondInstability: u64,
7 pub InboundBitsPerSecondInstability: u64,
8 pub OutboundBandwidthPeaked: bool,
9 pub InboundBandwidthPeaked: bool,
10 }
11 impl ::core::marker::Copy for BandwidthStatistics {}
12 impl ::core::clone::Clone for BandwidthStatistics {
13 fn clone(&self) -> Self {
14 *self
15 }
16 }
17 pub type ControlChannelTrigger = *mut ::core::ffi::c_void;
18 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
19 #[repr(transparent)]
20 pub struct ControlChannelTriggerResetReason(pub i32);
21 impl ControlChannelTriggerResetReason {
22 pub const FastUserSwitched: Self = Self(0i32);
23 pub const LowPowerExit: Self = Self(1i32);
24 pub const QuietHoursExit: Self = Self(2i32);
25 pub const ApplicationRestart: Self = Self(3i32);
26 }
27 impl ::core::marker::Copy for ControlChannelTriggerResetReason {}
28 impl ::core::clone::Clone for ControlChannelTriggerResetReason {
29 fn clone(&self) -> Self {
30 *self
31 }
32 }
33 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
34 #[repr(transparent)]
35 pub struct ControlChannelTriggerResourceType(pub i32);
36 impl ControlChannelTriggerResourceType {
37 pub const RequestSoftwareSlot: Self = Self(0i32);
38 pub const RequestHardwareSlot: Self = Self(1i32);
39 }
40 impl ::core::marker::Copy for ControlChannelTriggerResourceType {}
41 impl ::core::clone::Clone for ControlChannelTriggerResourceType {
42 fn clone(&self) -> Self {
43 *self
44 }
45 }
46 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
47 #[repr(transparent)]
48 pub struct ControlChannelTriggerStatus(pub i32);
49 impl ControlChannelTriggerStatus {
50 pub const HardwareSlotRequested: Self = Self(0i32);
51 pub const SoftwareSlotAllocated: Self = Self(1i32);
52 pub const HardwareSlotAllocated: Self = Self(2i32);
53 pub const PolicyError: Self = Self(3i32);
54 pub const SystemError: Self = Self(4i32);
55 pub const TransportDisconnected: Self = Self(5i32);
56 pub const ServiceUnavailable: Self = Self(6i32);
57 }
58 impl ::core::marker::Copy for ControlChannelTriggerStatus {}
59 impl ::core::clone::Clone for ControlChannelTriggerStatus {
60 fn clone(&self) -> Self {
61 *self
62 }
63 }
64 pub type DatagramSocket = *mut ::core::ffi::c_void;
65 pub type DatagramSocketControl = *mut ::core::ffi::c_void;
66 pub type DatagramSocketInformation = *mut ::core::ffi::c_void;
67 pub type DatagramSocketMessageReceivedEventArgs = *mut ::core::ffi::c_void;
68 pub type IControlChannelTriggerEventDetails = *mut ::core::ffi::c_void;
69 pub type IControlChannelTriggerResetEventDetails = *mut ::core::ffi::c_void;
70 pub type IWebSocket = *mut ::core::ffi::c_void;
71 pub type IWebSocketControl = *mut ::core::ffi::c_void;
72 pub type IWebSocketControl2 = *mut ::core::ffi::c_void;
73 pub type IWebSocketInformation = *mut ::core::ffi::c_void;
74 pub type IWebSocketInformation2 = *mut ::core::ffi::c_void;
75 pub type MessageWebSocket = *mut ::core::ffi::c_void;
76 pub type MessageWebSocketControl = *mut ::core::ffi::c_void;
77 pub type MessageWebSocketInformation = *mut ::core::ffi::c_void;
78 pub type MessageWebSocketMessageReceivedEventArgs = *mut ::core::ffi::c_void;
79 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
80 #[repr(transparent)]
81 pub struct MessageWebSocketReceiveMode(pub i32);
82 impl MessageWebSocketReceiveMode {
83 pub const FullMessage: Self = Self(0i32);
84 pub const PartialMessage: Self = Self(1i32);
85 }
86 impl ::core::marker::Copy for MessageWebSocketReceiveMode {}
87 impl ::core::clone::Clone for MessageWebSocketReceiveMode {
88 fn clone(&self) -> Self {
89 *self
90 }
91 }
92 #[repr(C)]
93 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
94 pub struct RoundTripTimeStatistics {
95 pub Variance: u32,
96 pub Max: u32,
97 pub Min: u32,
98 pub Sum: u32,
99 }
100 impl ::core::marker::Copy for RoundTripTimeStatistics {}
101 impl ::core::clone::Clone for RoundTripTimeStatistics {
102 fn clone(&self) -> Self {
103 *self
104 }
105 }
106 pub type ServerMessageWebSocket = *mut ::core::ffi::c_void;
107 pub type ServerMessageWebSocketControl = *mut ::core::ffi::c_void;
108 pub type ServerMessageWebSocketInformation = *mut ::core::ffi::c_void;
109 pub type ServerStreamWebSocket = *mut ::core::ffi::c_void;
110 pub type ServerStreamWebSocketInformation = *mut ::core::ffi::c_void;
111 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
112 #[repr(transparent)]
113 pub struct SocketActivityConnectedStandbyAction(pub i32);
114 impl SocketActivityConnectedStandbyAction {
115 pub const DoNotWake: Self = Self(0i32);
116 pub const Wake: Self = Self(1i32);
117 }
118 impl ::core::marker::Copy for SocketActivityConnectedStandbyAction {}
119 impl ::core::clone::Clone for SocketActivityConnectedStandbyAction {
120 fn clone(&self) -> Self {
121 *self
122 }
123 }
124 pub type SocketActivityContext = *mut ::core::ffi::c_void;
125 pub type SocketActivityInformation = *mut ::core::ffi::c_void;
126 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
127 #[repr(transparent)]
128 pub struct SocketActivityKind(pub i32);
129 impl SocketActivityKind {
130 pub const None: Self = Self(0i32);
131 pub const StreamSocketListener: Self = Self(1i32);
132 pub const DatagramSocket: Self = Self(2i32);
133 pub const StreamSocket: Self = Self(3i32);
134 }
135 impl ::core::marker::Copy for SocketActivityKind {}
136 impl ::core::clone::Clone for SocketActivityKind {
137 fn clone(&self) -> Self {
138 *self
139 }
140 }
141 pub type SocketActivityTriggerDetails = *mut ::core::ffi::c_void;
142 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
143 #[repr(transparent)]
144 pub struct SocketActivityTriggerReason(pub i32);
145 impl SocketActivityTriggerReason {
146 pub const None: Self = Self(0i32);
147 pub const SocketActivity: Self = Self(1i32);
148 pub const ConnectionAccepted: Self = Self(2i32);
149 pub const KeepAliveTimerExpired: Self = Self(3i32);
150 pub const SocketClosed: Self = Self(4i32);
151 }
152 impl ::core::marker::Copy for SocketActivityTriggerReason {}
153 impl ::core::clone::Clone for SocketActivityTriggerReason {
154 fn clone(&self) -> Self {
155 *self
156 }
157 }
158 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
159 #[repr(transparent)]
160 pub struct SocketErrorStatus(pub i32);
161 impl SocketErrorStatus {
162 pub const Unknown: Self = Self(0i32);
163 pub const OperationAborted: Self = Self(1i32);
164 pub const HttpInvalidServerResponse: Self = Self(2i32);
165 pub const ConnectionTimedOut: Self = Self(3i32);
166 pub const AddressFamilyNotSupported: Self = Self(4i32);
167 pub const SocketTypeNotSupported: Self = Self(5i32);
168 pub const HostNotFound: Self = Self(6i32);
169 pub const NoDataRecordOfRequestedType: Self = Self(7i32);
170 pub const NonAuthoritativeHostNotFound: Self = Self(8i32);
171 pub const ClassTypeNotFound: Self = Self(9i32);
172 pub const AddressAlreadyInUse: Self = Self(10i32);
173 pub const CannotAssignRequestedAddress: Self = Self(11i32);
174 pub const ConnectionRefused: Self = Self(12i32);
175 pub const NetworkIsUnreachable: Self = Self(13i32);
176 pub const UnreachableHost: Self = Self(14i32);
177 pub const NetworkIsDown: Self = Self(15i32);
178 pub const NetworkDroppedConnectionOnReset: Self = Self(16i32);
179 pub const SoftwareCausedConnectionAbort: Self = Self(17i32);
180 pub const ConnectionResetByPeer: Self = Self(18i32);
181 pub const HostIsDown: Self = Self(19i32);
182 pub const NoAddressesFound: Self = Self(20i32);
183 pub const TooManyOpenFiles: Self = Self(21i32);
184 pub const MessageTooLong: Self = Self(22i32);
185 pub const CertificateExpired: Self = Self(23i32);
186 pub const CertificateUntrustedRoot: Self = Self(24i32);
187 pub const CertificateCommonNameIsIncorrect: Self = Self(25i32);
188 pub const CertificateWrongUsage: Self = Self(26i32);
189 pub const CertificateRevoked: Self = Self(27i32);
190 pub const CertificateNoRevocationCheck: Self = Self(28i32);
191 pub const CertificateRevocationServerOffline: Self = Self(29i32);
192 pub const CertificateIsInvalid: Self = Self(30i32);
193 }
194 impl ::core::marker::Copy for SocketErrorStatus {}
195 impl ::core::clone::Clone for SocketErrorStatus {
196 fn clone(&self) -> Self {
197 *self
198 }
199 }
200 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
201 #[repr(transparent)]
202 pub struct SocketMessageType(pub i32);
203 impl SocketMessageType {
204 pub const Binary: Self = Self(0i32);
205 pub const Utf8: Self = Self(1i32);
206 }
207 impl ::core::marker::Copy for SocketMessageType {}
208 impl ::core::clone::Clone for SocketMessageType {
209 fn clone(&self) -> Self {
210 *self
211 }
212 }
213 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
214 #[repr(transparent)]
215 pub struct SocketProtectionLevel(pub i32);
216 impl SocketProtectionLevel {
217 pub const PlainSocket: Self = Self(0i32);
218 pub const Ssl: Self = Self(1i32);
219 pub const SslAllowNullEncryption: Self = Self(2i32);
220 pub const BluetoothEncryptionAllowNullAuthentication: Self = Self(3i32);
221 pub const BluetoothEncryptionWithAuthentication: Self = Self(4i32);
222 pub const Ssl3AllowWeakEncryption: Self = Self(5i32);
223 pub const Tls10: Self = Self(6i32);
224 pub const Tls11: Self = Self(7i32);
225 pub const Tls12: Self = Self(8i32);
226 pub const Unspecified: Self = Self(9i32);
227 }
228 impl ::core::marker::Copy for SocketProtectionLevel {}
229 impl ::core::clone::Clone for SocketProtectionLevel {
230 fn clone(&self) -> Self {
231 *self
232 }
233 }
234 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
235 #[repr(transparent)]
236 pub struct SocketQualityOfService(pub i32);
237 impl SocketQualityOfService {
238 pub const Normal: Self = Self(0i32);
239 pub const LowLatency: Self = Self(1i32);
240 }
241 impl ::core::marker::Copy for SocketQualityOfService {}
242 impl ::core::clone::Clone for SocketQualityOfService {
243 fn clone(&self) -> Self {
244 *self
245 }
246 }
247 #[doc = "*Required features: `\"Networking_Sockets\"`*"]
248 #[repr(transparent)]
249 pub struct SocketSslErrorSeverity(pub i32);
250 impl SocketSslErrorSeverity {
251 pub const None: Self = Self(0i32);
252 pub const Ignorable: Self = Self(1i32);
253 pub const Fatal: Self = Self(2i32);
254 }
255 impl ::core::marker::Copy for SocketSslErrorSeverity {}
256 impl ::core::clone::Clone for SocketSslErrorSeverity {
257 fn clone(&self) -> Self {
258 *self
259 }
260 }
261 pub type StreamSocket = *mut ::core::ffi::c_void;
262 pub type StreamSocketControl = *mut ::core::ffi::c_void;
263 pub type StreamSocketInformation = *mut ::core::ffi::c_void;
264 pub type StreamSocketListener = *mut ::core::ffi::c_void;
265 pub type StreamSocketListenerConnectionReceivedEventArgs = *mut ::core::ffi::c_void;
266 pub type StreamSocketListenerControl = *mut ::core::ffi::c_void;
267 pub type StreamSocketListenerInformation = *mut ::core::ffi::c_void;
268 pub type StreamWebSocket = *mut ::core::ffi::c_void;
269 pub type StreamWebSocketControl = *mut ::core::ffi::c_void;
270 pub type StreamWebSocketInformation = *mut ::core::ffi::c_void;
271 pub type WebSocketClosedEventArgs = *mut ::core::ffi::c_void;
272 pub type WebSocketKeepAlive = *mut ::core::ffi::c_void;
273 pub type WebSocketServerCustomValidationRequestedEventArgs = *mut ::core::ffi::c_void;