# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property
from abc import abstractmethod

import winrt._winrt
import winrt.system
import winrt.windows.applicationmodel.background as windows_applicationmodel_background
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.networking as windows_networking
import winrt.windows.networking.connectivity as windows_networking_connectivity
import winrt.windows.security.credentials as windows_security_credentials
import winrt.windows.security.cryptography.certificates as windows_security_cryptography_certificates
import winrt.windows.storage.streams as windows_storage_streams
import winrt.windows.web as windows_web

from winrt.windows.networking.sockets import ControlChannelTriggerResetReason, ControlChannelTriggerResourceType, ControlChannelTriggerStatus, MessageWebSocketReceiveMode, SocketActivityConnectedStandbyAction, SocketActivityKind, SocketActivityTriggerReason, SocketErrorStatus, SocketMessageType, SocketProtectionLevel, SocketQualityOfService, SocketSslErrorSeverity

Self = typing.TypeVar('Self')

@typing.final
class BandwidthStatistics:
    @_property
    def outbound_bits_per_second(self) -> winrt.system.UInt64: ...
    @_property
    def inbound_bits_per_second(self) -> winrt.system.UInt64: ...
    @_property
    def outbound_bits_per_second_instability(self) -> winrt.system.UInt64: ...
    @_property
    def inbound_bits_per_second_instability(self) -> winrt.system.UInt64: ...
    @_property
    def outbound_bandwidth_peaked(self) -> bool: ...
    @_property
    def inbound_bandwidth_peaked(self) -> bool: ...
    def __new__(cls, outbound_bits_per_second: winrt.system.UInt64 = 0, inbound_bits_per_second: winrt.system.UInt64 = 0, outbound_bits_per_second_instability: winrt.system.UInt64 = 0, inbound_bits_per_second_instability: winrt.system.UInt64 = 0, outbound_bandwidth_peaked: bool = False, inbound_bandwidth_peaked: bool = False) -> BandwidthStatistics: ...
    def __replace__(self, /, **changes: typing.Any) -> BandwidthStatistics: ...
    def unpack(self) -> typing.Tuple[winrt.system.UInt64, winrt.system.UInt64, winrt.system.UInt64, winrt.system.UInt64, bool, bool]: ...

@typing.final
class RoundTripTimeStatistics:
    @_property
    def variance(self) -> winrt.system.UInt32: ...
    @_property
    def max(self) -> winrt.system.UInt32: ...
    @_property
    def min(self) -> winrt.system.UInt32: ...
    @_property
    def sum(self) -> winrt.system.UInt32: ...
    def __new__(cls, variance: winrt.system.UInt32 = 0, max: winrt.system.UInt32 = 0, min: winrt.system.UInt32 = 0, sum: winrt.system.UInt32 = 0) -> RoundTripTimeStatistics: ...
    def __replace__(self, /, **changes: typing.Any) -> RoundTripTimeStatistics: ...
    def unpack(self) -> typing.Tuple[winrt.system.UInt32, winrt.system.UInt32, winrt.system.UInt32, winrt.system.UInt32]: ...

@typing.final
class ControlChannelTrigger(winrt.system.Object, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    @typing.overload
    def __new__(cls: typing.Type[Self], channel_id: str, server_keep_alive_interval_in_minutes: winrt.system.UInt32) -> Self: ...
    @typing.overload
    def __new__(cls: typing.Type[Self], channel_id: str, server_keep_alive_interval_in_minutes: winrt.system.UInt32, resource_request_type: ControlChannelTriggerResourceType) -> Self: ...
    # System.Void Windows.Networking.Sockets.ControlChannelTrigger::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.ControlChannelTrigger::DecreaseNetworkKeepAliveInterval()
    def decrease_network_keep_alive_interval(self) -> None: ...
    # System.Void Windows.Networking.Sockets.ControlChannelTrigger::FlushTransport()
    def flush_transport(self) -> None: ...
    # System.Void Windows.Networking.Sockets.ControlChannelTrigger::UsingTransport(System.Object)
    def using_transport(self, transport: winrt.system.Object, /) -> None: ...
    # Windows.Networking.Sockets.ControlChannelTriggerStatus Windows.Networking.Sockets.ControlChannelTrigger::WaitForPushEnabled()
    def wait_for_push_enabled(self) -> ControlChannelTriggerStatus: ...
    # System.UInt32 Windows.Networking.Sockets.ControlChannelTrigger::get_ServerKeepAliveIntervalInMinutes()
    @_property
    def server_keep_alive_interval_in_minutes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.ControlChannelTrigger::put_ServerKeepAliveIntervalInMinutes(System.UInt32)
    @server_keep_alive_interval_in_minutes.setter
    def server_keep_alive_interval_in_minutes(self, value: winrt.system.UInt32) -> None: ...
    # System.String Windows.Networking.Sockets.ControlChannelTrigger::get_ControlChannelTriggerId()
    @_property
    def control_channel_trigger_id(self) -> str: ...
    # System.UInt32 Windows.Networking.Sockets.ControlChannelTrigger::get_CurrentKeepAliveIntervalInMinutes()
    @_property
    def current_keep_alive_interval_in_minutes(self) -> winrt.system.UInt32: ...
    # Windows.ApplicationModel.Background.IBackgroundTrigger Windows.Networking.Sockets.ControlChannelTrigger::get_KeepAliveTrigger()
    @_property
    def keep_alive_trigger(self) -> windows_applicationmodel_background.IBackgroundTrigger: ...
    # Windows.ApplicationModel.Background.IBackgroundTrigger Windows.Networking.Sockets.ControlChannelTrigger::get_PushNotificationTrigger()
    @_property
    def push_notification_trigger(self) -> windows_applicationmodel_background.IBackgroundTrigger: ...
    # System.Object Windows.Networking.Sockets.ControlChannelTrigger::get_TransportObject()
    @_property
    def transport_object(self) -> winrt.system.Object: ...
    # System.Boolean Windows.Networking.Sockets.ControlChannelTrigger::get_IsWakeFromLowPowerSupported()
    @_property
    def is_wake_from_low_power_supported(self) -> bool: ...

@typing.final
class DatagramSocket_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.EndpointPair>> Windows.Networking.Sockets.DatagramSocket::GetEndpointPairsAsync(Windows.Networking.HostName,System.String)
    def get_endpoint_pairs_async(cls, remote_host_name: windows_networking.HostName, remote_service_name: str, /) -> windows_foundation.IAsyncOperation[typing.Sequence[windows_networking.EndpointPair]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.EndpointPair>> Windows.Networking.Sockets.DatagramSocket::GetEndpointPairsAsync(Windows.Networking.HostName,System.String,Windows.Networking.HostNameSortOptions)
    def get_endpoint_pairs_with_sort_options_async(cls, remote_host_name: windows_networking.HostName, remote_service_name: str, sort_options: windows_networking.HostNameSortOptions, /) -> windows_foundation.IAsyncOperation[typing.Sequence[windows_networking.EndpointPair]]: ...

@typing.final
class DatagramSocket(winrt.system.Object, windows_foundation.IClosable, metaclass=DatagramSocket_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::BindEndpointAsync(Windows.Networking.HostName,System.String)
    def bind_endpoint_async(self, local_host_name: windows_networking.HostName, local_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::BindServiceNameAsync(System.String,Windows.Networking.Connectivity.NetworkAdapter)
    def bind_service_name_and_adapter_async(self, local_service_name: str, adapter: windows_networking_connectivity.NetworkAdapter, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::BindServiceNameAsync(System.String)
    def bind_service_name_async(self, local_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::CancelIOAsync()
    def cancel_io_async(self) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::Close()
    def close(self) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::ConnectAsync(Windows.Networking.HostName,System.String)
    def connect_async(self, remote_host_name: windows_networking.HostName, remote_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.DatagramSocket::ConnectAsync(Windows.Networking.EndpointPair)
    def connect_with_endpoint_pair_async(self, endpoint_pair: windows_networking.EndpointPair, /) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::EnableTransferOwnership(System.Guid)
    def enable_transfer_ownership(self, task_id: _uuid.UUID, /) -> None: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::EnableTransferOwnership(System.Guid,Windows.Networking.Sockets.SocketActivityConnectedStandbyAction)
    def enable_transfer_ownership_with_connected_standby_action(self, task_id: _uuid.UUID, connected_standby_action: SocketActivityConnectedStandbyAction, /) -> None: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Storage.Streams.IOutputStream> Windows.Networking.Sockets.DatagramSocket::GetOutputStreamAsync(Windows.Networking.HostName,System.String)
    def get_output_stream_async(self, remote_host_name: windows_networking.HostName, remote_service_name: str, /) -> windows_foundation.IAsyncOperation[windows_storage_streams.IOutputStream]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Storage.Streams.IOutputStream> Windows.Networking.Sockets.DatagramSocket::GetOutputStreamAsync(Windows.Networking.EndpointPair)
    def get_output_stream_with_endpoint_pair_async(self, endpoint_pair: windows_networking.EndpointPair, /) -> windows_foundation.IAsyncOperation[windows_storage_streams.IOutputStream]: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::JoinMulticastGroup(Windows.Networking.HostName)
    def join_multicast_group(self, host: windows_networking.HostName, /) -> None: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::TransferOwnership(System.String)
    def transfer_ownership(self, socket_id: str, /) -> None: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::TransferOwnership(System.String,Windows.Networking.Sockets.SocketActivityContext)
    def transfer_ownership_with_context(self, socket_id: str, data: SocketActivityContext, /) -> None: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::TransferOwnership(System.String,Windows.Networking.Sockets.SocketActivityContext,Windows.Foundation.TimeSpan)
    def transfer_ownership_with_context_and_keep_alive_time(self, socket_id: str, data: SocketActivityContext, keep_alive_time: datetime.timedelta, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.DatagramSocket::add_MessageReceived(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.DatagramSocket,Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs>)
    def add_message_received(self, event_handler: windows_foundation.TypedEventHandler[DatagramSocket, DatagramSocketMessageReceivedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.DatagramSocket::remove_MessageReceived(Windows.Foundation.EventRegistrationToken)
    def remove_message_received(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.DatagramSocketControl Windows.Networking.Sockets.DatagramSocket::get_Control()
    @_property
    def control(self) -> DatagramSocketControl: ...
    # Windows.Networking.Sockets.DatagramSocketInformation Windows.Networking.Sockets.DatagramSocket::get_Information()
    @_property
    def information(self) -> DatagramSocketInformation: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.DatagramSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class DatagramSocketControl(winrt.system.Object):
    # Windows.Networking.Sockets.SocketQualityOfService Windows.Networking.Sockets.DatagramSocketControl::get_QualityOfService()
    @_property
    def quality_of_service(self) -> SocketQualityOfService: ...
    # System.Void Windows.Networking.Sockets.DatagramSocketControl::put_QualityOfService(Windows.Networking.Sockets.SocketQualityOfService)
    @quality_of_service.setter
    def quality_of_service(self, value: SocketQualityOfService) -> None: ...
    # System.Byte Windows.Networking.Sockets.DatagramSocketControl::get_OutboundUnicastHopLimit()
    @_property
    def outbound_unicast_hop_limit(self) -> winrt.system.UInt8: ...
    # System.Void Windows.Networking.Sockets.DatagramSocketControl::put_OutboundUnicastHopLimit(System.Byte)
    @outbound_unicast_hop_limit.setter
    def outbound_unicast_hop_limit(self, value: winrt.system.UInt8) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.DatagramSocketControl::get_InboundBufferSizeInBytes()
    @_property
    def inbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.DatagramSocketControl::put_InboundBufferSizeInBytes(System.UInt32)
    @inbound_buffer_size_in_bytes.setter
    def inbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # System.Boolean Windows.Networking.Sockets.DatagramSocketControl::get_DontFragment()
    @_property
    def dont_fragment(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.DatagramSocketControl::put_DontFragment(System.Boolean)
    @dont_fragment.setter
    def dont_fragment(self, value: bool) -> None: ...
    # System.Boolean Windows.Networking.Sockets.DatagramSocketControl::get_MulticastOnly()
    @_property
    def multicast_only(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.DatagramSocketControl::put_MulticastOnly(System.Boolean)
    @multicast_only.setter
    def multicast_only(self, value: bool) -> None: ...

@typing.final
class DatagramSocketInformation(winrt.system.Object):
    # Windows.Networking.HostName Windows.Networking.Sockets.DatagramSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.DatagramSocketInformation::get_LocalPort()
    @_property
    def local_port(self) -> str: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.DatagramSocketInformation::get_RemoteAddress()
    @_property
    def remote_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.DatagramSocketInformation::get_RemotePort()
    @_property
    def remote_port(self) -> str: ...

@typing.final
class DatagramSocketMessageReceivedEventArgs(winrt.system.Object):
    # Windows.Storage.Streams.DataReader Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs::GetDataReader()
    def get_data_reader(self) -> windows_storage_streams.DataReader: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs::GetDataStream()
    def get_data_stream(self) -> windows_storage_streams.IInputStream: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs::get_RemoteAddress()
    @_property
    def remote_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs::get_RemotePort()
    @_property
    def remote_port(self) -> str: ...

@typing.final
class MessageWebSocket(winrt.system.Object, IWebSocket, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::Close(System.UInt16,System.String)
    def close_with_status(self, code: winrt.system.UInt16, reason: str, /) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.MessageWebSocket::ConnectAsync(Windows.Foundation.Uri)
    def connect_async(self, uri: windows_foundation.Uri, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncOperationWithProgress`2<System.UInt32,System.UInt32> Windows.Networking.Sockets.MessageWebSocket::SendFinalFrameAsync(Windows.Storage.Streams.IBuffer)
    def send_final_frame_async(self, data: windows_storage_streams.IBuffer, /) -> windows_foundation.IAsyncOperationWithProgress[winrt.system.UInt32, winrt.system.UInt32]: ...
    # Windows.Foundation.IAsyncOperationWithProgress`2<System.UInt32,System.UInt32> Windows.Networking.Sockets.MessageWebSocket::SendNonfinalFrameAsync(Windows.Storage.Streams.IBuffer)
    def send_nonfinal_frame_async(self, data: windows_storage_streams.IBuffer, /) -> windows_foundation.IAsyncOperationWithProgress[winrt.system.UInt32, winrt.system.UInt32]: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.MessageWebSocket::add_MessageReceived(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.MessageWebSocket,Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs>)
    def add_message_received(self, event_handler: windows_foundation.TypedEventHandler[MessageWebSocket, MessageWebSocketMessageReceivedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::remove_MessageReceived(Windows.Foundation.EventRegistrationToken)
    def remove_message_received(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.MessageWebSocket::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.IWebSocket,Windows.Networking.Sockets.WebSocketClosedEventArgs>)
    def add_closed(self, event_handler: windows_foundation.TypedEventHandler[IWebSocket, WebSocketClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::remove_Closed(Windows.Foundation.EventRegistrationToken)
    def remove_closed(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.MessageWebSocket::add_ServerCustomValidationRequested(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.MessageWebSocket,Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs>)
    def add_server_custom_validation_requested(self, event_handler: windows_foundation.TypedEventHandler[MessageWebSocket, WebSocketServerCustomValidationRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocket::remove_ServerCustomValidationRequested(Windows.Foundation.EventRegistrationToken)
    def remove_server_custom_validation_requested(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.MessageWebSocketControl Windows.Networking.Sockets.MessageWebSocket::get_Control()
    @_property
    def control(self) -> MessageWebSocketControl: ...
    # Windows.Networking.Sockets.MessageWebSocketInformation Windows.Networking.Sockets.MessageWebSocket::get_Information()
    @_property
    def information(self) -> MessageWebSocketInformation: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.MessageWebSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class MessageWebSocketControl(winrt.system.Object, IWebSocketControl2, IWebSocketControl):
    # Windows.Networking.Sockets.SocketMessageType Windows.Networking.Sockets.MessageWebSocketControl::get_MessageType()
    @_property
    def message_type(self) -> SocketMessageType: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_MessageType(Windows.Networking.Sockets.SocketMessageType)
    @message_type.setter
    def message_type(self, value: SocketMessageType) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.MessageWebSocketControl::get_MaxMessageSize()
    @_property
    def max_message_size(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_MaxMessageSize(System.UInt32)
    @max_message_size.setter
    def max_message_size(self, value: winrt.system.UInt32) -> None: ...
    # Windows.Networking.Sockets.MessageWebSocketReceiveMode Windows.Networking.Sockets.MessageWebSocketControl::get_ReceiveMode()
    @_property
    def receive_mode(self) -> MessageWebSocketReceiveMode: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_ReceiveMode(Windows.Networking.Sockets.MessageWebSocketReceiveMode)
    @receive_mode.setter
    def receive_mode(self, value: MessageWebSocketReceiveMode) -> None: ...
    # Windows.Foundation.TimeSpan Windows.Networking.Sockets.MessageWebSocketControl::get_DesiredUnsolicitedPongInterval()
    @_property
    def desired_unsolicited_pong_interval(self) -> datetime.timedelta: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_DesiredUnsolicitedPongInterval(Windows.Foundation.TimeSpan)
    @desired_unsolicited_pong_interval.setter
    def desired_unsolicited_pong_interval(self, value: datetime.timedelta) -> None: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.MessageWebSocketControl::get_ClientCertificate()
    @_property
    def client_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_ClientCertificate(Windows.Security.Cryptography.Certificates.Certificate)
    @client_certificate.setter
    def client_certificate(self, value: windows_security_cryptography_certificates.Certificate) -> None: ...
    # Windows.Foundation.TimeSpan Windows.Networking.Sockets.MessageWebSocketControl::get_ActualUnsolicitedPongInterval()
    @_property
    def actual_unsolicited_pong_interval(self) -> datetime.timedelta: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.MessageWebSocketControl::get_ServerCredential()
    @_property
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.MessageWebSocketControl::get_ProxyCredential()
    @_property
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.MessageWebSocketControl::get_OutboundBufferSizeInBytes()
    @_property
    def outbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.MessageWebSocketControl::put_OutboundBufferSizeInBytes(System.UInt32)
    @outbound_buffer_size_in_bytes.setter
    def outbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # Windows.Foundation.Collections.IVector`1<System.String> Windows.Networking.Sockets.MessageWebSocketControl::get_SupportedProtocols()
    @_property
    def supported_protocols(self) -> typing.MutableSequence[str]: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.MessageWebSocketControl::get_IgnorableServerCertificateErrors()
    @_property
    def ignorable_server_certificate_errors(self) -> typing.MutableSequence[windows_security_cryptography_certificates.ChainValidationResult]: ...

@typing.final
class MessageWebSocketInformation(winrt.system.Object, IWebSocketInformation2, IWebSocketInformation):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.MessageWebSocketInformation::get_BandwidthStatistics()
    @_property
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.MessageWebSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.MessageWebSocketInformation::get_Protocol()
    @_property
    def protocol(self) -> str: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.MessageWebSocketInformation::get_ServerCertificate()
    @_property
    def server_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # Windows.Networking.Sockets.SocketSslErrorSeverity Windows.Networking.Sockets.MessageWebSocketInformation::get_ServerCertificateErrorSeverity()
    @_property
    def server_certificate_error_severity(self) -> SocketSslErrorSeverity: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.MessageWebSocketInformation::get_ServerCertificateErrors()
    @_property
    def server_certificate_errors(self) -> typing.Sequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.Certificate> Windows.Networking.Sockets.MessageWebSocketInformation::get_ServerIntermediateCertificates()
    @_property
    def server_intermediate_certificates(self) -> typing.Sequence[windows_security_cryptography_certificates.Certificate]: ...

@typing.final
class MessageWebSocketMessageReceivedEventArgs(winrt.system.Object):
    # Windows.Storage.Streams.DataReader Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs::GetDataReader()
    def get_data_reader(self) -> windows_storage_streams.DataReader: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs::GetDataStream()
    def get_data_stream(self) -> windows_storage_streams.IInputStream: ...
    # Windows.Networking.Sockets.SocketMessageType Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs::get_MessageType()
    @_property
    def message_type(self) -> SocketMessageType: ...
    # System.Boolean Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs::get_IsMessageComplete()
    @_property
    def is_message_complete(self) -> bool: ...

@typing.final
class ServerMessageWebSocket(winrt.system.Object, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    # System.Void Windows.Networking.Sockets.ServerMessageWebSocket::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.ServerMessageWebSocket::Close(System.UInt16,System.String)
    def close_with_status(self, code: winrt.system.UInt16, reason: str, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.ServerMessageWebSocket::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.ServerMessageWebSocket,Windows.Networking.Sockets.WebSocketClosedEventArgs>)
    def add_closed(self, value: windows_foundation.TypedEventHandler[ServerMessageWebSocket, WebSocketClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.ServerMessageWebSocket::remove_Closed(Windows.Foundation.EventRegistrationToken)
    def remove_closed(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.ServerMessageWebSocket::add_MessageReceived(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.ServerMessageWebSocket,Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs>)
    def add_message_received(self, value: windows_foundation.TypedEventHandler[ServerMessageWebSocket, MessageWebSocketMessageReceivedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.ServerMessageWebSocket::remove_MessageReceived(Windows.Foundation.EventRegistrationToken)
    def remove_message_received(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.ServerMessageWebSocketControl Windows.Networking.Sockets.ServerMessageWebSocket::get_Control()
    @_property
    def control(self) -> ServerMessageWebSocketControl: ...
    # Windows.Networking.Sockets.ServerMessageWebSocketInformation Windows.Networking.Sockets.ServerMessageWebSocket::get_Information()
    @_property
    def information(self) -> ServerMessageWebSocketInformation: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.ServerMessageWebSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class ServerMessageWebSocketControl(winrt.system.Object):
    # Windows.Networking.Sockets.SocketMessageType Windows.Networking.Sockets.ServerMessageWebSocketControl::get_MessageType()
    @_property
    def message_type(self) -> SocketMessageType: ...
    # System.Void Windows.Networking.Sockets.ServerMessageWebSocketControl::put_MessageType(Windows.Networking.Sockets.SocketMessageType)
    @message_type.setter
    def message_type(self, value: SocketMessageType) -> None: ...

@typing.final
class ServerMessageWebSocketInformation(winrt.system.Object):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.ServerMessageWebSocketInformation::get_BandwidthStatistics()
    @_property
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.ServerMessageWebSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.ServerMessageWebSocketInformation::get_Protocol()
    @_property
    def protocol(self) -> str: ...

@typing.final
class ServerStreamWebSocket(winrt.system.Object, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    # System.Void Windows.Networking.Sockets.ServerStreamWebSocket::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.ServerStreamWebSocket::Close(System.UInt16,System.String)
    def close_with_status(self, code: winrt.system.UInt16, reason: str, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.ServerStreamWebSocket::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.ServerStreamWebSocket,Windows.Networking.Sockets.WebSocketClosedEventArgs>)
    def add_closed(self, value: windows_foundation.TypedEventHandler[ServerStreamWebSocket, WebSocketClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.ServerStreamWebSocket::remove_Closed(Windows.Foundation.EventRegistrationToken)
    def remove_closed(self, token: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.ServerStreamWebSocketInformation Windows.Networking.Sockets.ServerStreamWebSocket::get_Information()
    @_property
    def information(self) -> ServerStreamWebSocketInformation: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.Sockets.ServerStreamWebSocket::get_InputStream()
    @_property
    def input_stream(self) -> windows_storage_streams.IInputStream: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.ServerStreamWebSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class ServerStreamWebSocketInformation(winrt.system.Object):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.ServerStreamWebSocketInformation::get_BandwidthStatistics()
    @_property
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.ServerStreamWebSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.ServerStreamWebSocketInformation::get_Protocol()
    @_property
    def protocol(self) -> str: ...

@typing.final
class SocketActivityContext(winrt.system.Object):
    def __new__(cls: typing.Type[Self], data: windows_storage_streams.IBuffer) -> Self: ...
    # Windows.Storage.Streams.IBuffer Windows.Networking.Sockets.SocketActivityContext::get_Data()
    @_property
    def data(self) -> windows_storage_streams.IBuffer: ...

@typing.final
class SocketActivityInformation_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.Collections.IMapView`2<System.String,Windows.Networking.Sockets.SocketActivityInformation> Windows.Networking.Sockets.SocketActivityInformation::get_AllSockets()
    @_property
    def all_sockets(cls) -> typing.Mapping[str, SocketActivityInformation]: ...

@typing.final
class SocketActivityInformation(winrt.system.Object, metaclass=SocketActivityInformation_Static):
    # Windows.Networking.Sockets.SocketActivityContext Windows.Networking.Sockets.SocketActivityInformation::get_Context()
    @_property
    def context(self) -> SocketActivityContext: ...
    # Windows.Networking.Sockets.DatagramSocket Windows.Networking.Sockets.SocketActivityInformation::get_DatagramSocket()
    @_property
    def datagram_socket(self) -> DatagramSocket: ...
    # System.String Windows.Networking.Sockets.SocketActivityInformation::get_Id()
    @_property
    def id(self) -> str: ...
    # Windows.Networking.Sockets.SocketActivityKind Windows.Networking.Sockets.SocketActivityInformation::get_SocketKind()
    @_property
    def socket_kind(self) -> SocketActivityKind: ...
    # Windows.Networking.Sockets.StreamSocket Windows.Networking.Sockets.SocketActivityInformation::get_StreamSocket()
    @_property
    def stream_socket(self) -> StreamSocket: ...
    # Windows.Networking.Sockets.StreamSocketListener Windows.Networking.Sockets.SocketActivityInformation::get_StreamSocketListener()
    @_property
    def stream_socket_listener(self) -> StreamSocketListener: ...
    # System.Guid Windows.Networking.Sockets.SocketActivityInformation::get_TaskId()
    @_property
    def task_id(self) -> _uuid.UUID: ...

@typing.final
class SocketActivityTriggerDetails(winrt.system.Object):
    # Windows.Networking.Sockets.SocketActivityTriggerReason Windows.Networking.Sockets.SocketActivityTriggerDetails::get_Reason()
    @_property
    def reason(self) -> SocketActivityTriggerReason: ...
    # Windows.Networking.Sockets.SocketActivityInformation Windows.Networking.Sockets.SocketActivityTriggerDetails::get_SocketInformation()
    @_property
    def socket_information(self) -> SocketActivityInformation: ...

@typing.final
class SocketError_Static(winrt._winrt.IInspectable_Static):
    # Windows.Networking.Sockets.SocketErrorStatus Windows.Networking.Sockets.SocketError::GetStatus(System.Int32)
    def get_status(cls, hresult: winrt.system.Int32, /) -> SocketErrorStatus: ...

@typing.final
class SocketError(winrt.system.Object, metaclass=SocketError_Static):
    pass

@typing.final
class StreamSocket_Static(winrt._winrt.IInspectable_Static):
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.EndpointPair>> Windows.Networking.Sockets.StreamSocket::GetEndpointPairsAsync(Windows.Networking.HostName,System.String)
    def get_endpoint_pairs_async(cls, remote_host_name: windows_networking.HostName, remote_service_name: str, /) -> windows_foundation.IAsyncOperation[typing.Sequence[windows_networking.EndpointPair]]: ...
    # Windows.Foundation.IAsyncOperation`1<Windows.Foundation.Collections.IVectorView`1<Windows.Networking.EndpointPair>> Windows.Networking.Sockets.StreamSocket::GetEndpointPairsAsync(Windows.Networking.HostName,System.String,Windows.Networking.HostNameSortOptions)
    def get_endpoint_pairs_with_sort_options_async(cls, remote_host_name: windows_networking.HostName, remote_service_name: str, sort_options: windows_networking.HostNameSortOptions, /) -> windows_foundation.IAsyncOperation[typing.Sequence[windows_networking.EndpointPair]]: ...

@typing.final
class StreamSocket(winrt.system.Object, windows_foundation.IClosable, metaclass=StreamSocket_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::CancelIOAsync()
    def cancel_io_async(self) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::Close()
    def close(self) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::ConnectAsync(Windows.Networking.HostName,System.String)
    def connect_async(self, remote_host_name: windows_networking.HostName, remote_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::ConnectAsync(Windows.Networking.EndpointPair,Windows.Networking.Sockets.SocketProtectionLevel)
    def connect_with_endpoint_pair_and_protection_level_async(self, endpoint_pair: windows_networking.EndpointPair, protection_level: SocketProtectionLevel, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::ConnectAsync(Windows.Networking.EndpointPair)
    def connect_with_endpoint_pair_async(self, endpoint_pair: windows_networking.EndpointPair, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::ConnectAsync(Windows.Networking.HostName,System.String,Windows.Networking.Sockets.SocketProtectionLevel,Windows.Networking.Connectivity.NetworkAdapter)
    def connect_with_protection_level_and_adapter_async(self, remote_host_name: windows_networking.HostName, remote_service_name: str, protection_level: SocketProtectionLevel, adapter: windows_networking_connectivity.NetworkAdapter, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::ConnectAsync(Windows.Networking.HostName,System.String,Windows.Networking.Sockets.SocketProtectionLevel)
    def connect_with_protection_level_async(self, remote_host_name: windows_networking.HostName, remote_service_name: str, protection_level: SocketProtectionLevel, /) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::EnableTransferOwnership(System.Guid)
    def enable_transfer_ownership(self, task_id: _uuid.UUID, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::EnableTransferOwnership(System.Guid,Windows.Networking.Sockets.SocketActivityConnectedStandbyAction)
    def enable_transfer_ownership_with_connected_standby_action(self, task_id: _uuid.UUID, connected_standby_action: SocketActivityConnectedStandbyAction, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::TransferOwnership(System.String)
    def transfer_ownership(self, socket_id: str, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::TransferOwnership(System.String,Windows.Networking.Sockets.SocketActivityContext)
    def transfer_ownership_with_context(self, socket_id: str, data: SocketActivityContext, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocket::TransferOwnership(System.String,Windows.Networking.Sockets.SocketActivityContext,Windows.Foundation.TimeSpan)
    def transfer_ownership_with_context_and_keep_alive_time(self, socket_id: str, data: SocketActivityContext, keep_alive_time: datetime.timedelta, /) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocket::UpgradeToSslAsync(Windows.Networking.Sockets.SocketProtectionLevel,Windows.Networking.HostName)
    def upgrade_to_ssl_async(self, protection_level: SocketProtectionLevel, validation_host_name: windows_networking.HostName, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Networking.Sockets.StreamSocketControl Windows.Networking.Sockets.StreamSocket::get_Control()
    @_property
    def control(self) -> StreamSocketControl: ...
    # Windows.Networking.Sockets.StreamSocketInformation Windows.Networking.Sockets.StreamSocket::get_Information()
    @_property
    def information(self) -> StreamSocketInformation: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.Sockets.StreamSocket::get_InputStream()
    @_property
    def input_stream(self) -> windows_storage_streams.IInputStream: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.StreamSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class StreamSocketControl(winrt.system.Object):
    # Windows.Networking.Sockets.SocketQualityOfService Windows.Networking.Sockets.StreamSocketControl::get_QualityOfService()
    @_property
    def quality_of_service(self) -> SocketQualityOfService: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_QualityOfService(Windows.Networking.Sockets.SocketQualityOfService)
    @quality_of_service.setter
    def quality_of_service(self, value: SocketQualityOfService) -> None: ...
    # System.Byte Windows.Networking.Sockets.StreamSocketControl::get_OutboundUnicastHopLimit()
    @_property
    def outbound_unicast_hop_limit(self) -> winrt.system.UInt8: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_OutboundUnicastHopLimit(System.Byte)
    @outbound_unicast_hop_limit.setter
    def outbound_unicast_hop_limit(self, value: winrt.system.UInt8) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.StreamSocketControl::get_OutboundBufferSizeInBytes()
    @_property
    def outbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_OutboundBufferSizeInBytes(System.UInt32)
    @outbound_buffer_size_in_bytes.setter
    def outbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # System.Boolean Windows.Networking.Sockets.StreamSocketControl::get_NoDelay()
    @_property
    def no_delay(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_NoDelay(System.Boolean)
    @no_delay.setter
    def no_delay(self, value: bool) -> None: ...
    # System.Boolean Windows.Networking.Sockets.StreamSocketControl::get_KeepAlive()
    @_property
    def keep_alive(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_KeepAlive(System.Boolean)
    @keep_alive.setter
    def keep_alive(self, value: bool) -> None: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.StreamSocketControl::get_IgnorableServerCertificateErrors()
    @_property
    def ignorable_server_certificate_errors(self) -> typing.MutableSequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # System.Boolean Windows.Networking.Sockets.StreamSocketControl::get_SerializeConnectionAttempts()
    @_property
    def serialize_connection_attempts(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_SerializeConnectionAttempts(System.Boolean)
    @serialize_connection_attempts.setter
    def serialize_connection_attempts(self, value: bool) -> None: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.StreamSocketControl::get_ClientCertificate()
    @_property
    def client_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_ClientCertificate(Windows.Security.Cryptography.Certificates.Certificate)
    @client_certificate.setter
    def client_certificate(self, value: windows_security_cryptography_certificates.Certificate) -> None: ...
    # Windows.Networking.Sockets.SocketProtectionLevel Windows.Networking.Sockets.StreamSocketControl::get_MinProtectionLevel()
    @_property
    def min_protection_level(self) -> SocketProtectionLevel: ...
    # System.Void Windows.Networking.Sockets.StreamSocketControl::put_MinProtectionLevel(Windows.Networking.Sockets.SocketProtectionLevel)
    @min_protection_level.setter
    def min_protection_level(self, value: SocketProtectionLevel) -> None: ...

@typing.final
class StreamSocketInformation(winrt.system.Object):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.StreamSocketInformation::get_BandwidthStatistics()
    @_property
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.StreamSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.StreamSocketInformation::get_LocalPort()
    @_property
    def local_port(self) -> str: ...
    # Windows.Networking.Sockets.SocketProtectionLevel Windows.Networking.Sockets.StreamSocketInformation::get_ProtectionLevel()
    @_property
    def protection_level(self) -> SocketProtectionLevel: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.StreamSocketInformation::get_RemoteAddress()
    @_property
    def remote_address(self) -> windows_networking.HostName: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.StreamSocketInformation::get_RemoteHostName()
    @_property
    def remote_host_name(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.StreamSocketInformation::get_RemotePort()
    @_property
    def remote_port(self) -> str: ...
    # System.String Windows.Networking.Sockets.StreamSocketInformation::get_RemoteServiceName()
    @_property
    def remote_service_name(self) -> str: ...
    # Windows.Networking.Sockets.RoundTripTimeStatistics Windows.Networking.Sockets.StreamSocketInformation::get_RoundTripTimeStatistics()
    @_property
    def round_trip_time_statistics(self) -> RoundTripTimeStatistics: ...
    # Windows.Storage.Streams.IBuffer Windows.Networking.Sockets.StreamSocketInformation::get_SessionKey()
    @_property
    def session_key(self) -> windows_storage_streams.IBuffer: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.StreamSocketInformation::get_ServerCertificate()
    @_property
    def server_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # Windows.Networking.Sockets.SocketSslErrorSeverity Windows.Networking.Sockets.StreamSocketInformation::get_ServerCertificateErrorSeverity()
    @_property
    def server_certificate_error_severity(self) -> SocketSslErrorSeverity: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.StreamSocketInformation::get_ServerCertificateErrors()
    @_property
    def server_certificate_errors(self) -> typing.Sequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.Certificate> Windows.Networking.Sockets.StreamSocketInformation::get_ServerIntermediateCertificates()
    @_property
    def server_intermediate_certificates(self) -> typing.Sequence[windows_security_cryptography_certificates.Certificate]: ...

@typing.final
class StreamSocketListener(winrt.system.Object, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocketListener::BindEndpointAsync(Windows.Networking.HostName,System.String)
    def bind_endpoint_async(self, local_host_name: windows_networking.HostName, local_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocketListener::BindServiceNameAsync(System.String)
    def bind_service_name_async(self, local_service_name: str, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocketListener::BindServiceNameAsync(System.String,Windows.Networking.Sockets.SocketProtectionLevel,Windows.Networking.Connectivity.NetworkAdapter)
    def bind_service_name_with_protection_level_and_adapter_async(self, local_service_name: str, protection_level: SocketProtectionLevel, adapter: windows_networking_connectivity.NetworkAdapter, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocketListener::BindServiceNameAsync(System.String,Windows.Networking.Sockets.SocketProtectionLevel)
    def bind_service_name_with_protection_level_async(self, local_service_name: str, protection_level: SocketProtectionLevel, /) -> windows_foundation.IAsyncAction: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamSocketListener::CancelIOAsync()
    def cancel_io_async(self) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::EnableTransferOwnership(System.Guid)
    def enable_transfer_ownership(self, task_id: _uuid.UUID, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::EnableTransferOwnership(System.Guid,Windows.Networking.Sockets.SocketActivityConnectedStandbyAction)
    def enable_transfer_ownership_with_connected_standby_action(self, task_id: _uuid.UUID, connected_standby_action: SocketActivityConnectedStandbyAction, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::TransferOwnership(System.String)
    def transfer_ownership(self, socket_id: str, /) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::TransferOwnership(System.String,Windows.Networking.Sockets.SocketActivityContext)
    def transfer_ownership_with_context(self, socket_id: str, data: SocketActivityContext, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.StreamSocketListener::add_ConnectionReceived(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.StreamSocketListener,Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs>)
    def add_connection_received(self, event_handler: windows_foundation.TypedEventHandler[StreamSocketListener, StreamSocketListenerConnectionReceivedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListener::remove_ConnectionReceived(Windows.Foundation.EventRegistrationToken)
    def remove_connection_received(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.StreamSocketListenerControl Windows.Networking.Sockets.StreamSocketListener::get_Control()
    @_property
    def control(self) -> StreamSocketListenerControl: ...
    # Windows.Networking.Sockets.StreamSocketListenerInformation Windows.Networking.Sockets.StreamSocketListener::get_Information()
    @_property
    def information(self) -> StreamSocketListenerInformation: ...

@typing.final
class StreamSocketListenerConnectionReceivedEventArgs(winrt.system.Object):
    # Windows.Networking.Sockets.StreamSocket Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs::get_Socket()
    @_property
    def socket(self) -> StreamSocket: ...

@typing.final
class StreamSocketListenerControl(winrt.system.Object):
    # Windows.Networking.Sockets.SocketQualityOfService Windows.Networking.Sockets.StreamSocketListenerControl::get_QualityOfService()
    @_property
    def quality_of_service(self) -> SocketQualityOfService: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListenerControl::put_QualityOfService(Windows.Networking.Sockets.SocketQualityOfService)
    @quality_of_service.setter
    def quality_of_service(self, value: SocketQualityOfService) -> None: ...
    # System.Byte Windows.Networking.Sockets.StreamSocketListenerControl::get_OutboundUnicastHopLimit()
    @_property
    def outbound_unicast_hop_limit(self) -> winrt.system.UInt8: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListenerControl::put_OutboundUnicastHopLimit(System.Byte)
    @outbound_unicast_hop_limit.setter
    def outbound_unicast_hop_limit(self, value: winrt.system.UInt8) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.StreamSocketListenerControl::get_OutboundBufferSizeInBytes()
    @_property
    def outbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListenerControl::put_OutboundBufferSizeInBytes(System.UInt32)
    @outbound_buffer_size_in_bytes.setter
    def outbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # System.Boolean Windows.Networking.Sockets.StreamSocketListenerControl::get_NoDelay()
    @_property
    def no_delay(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListenerControl::put_NoDelay(System.Boolean)
    @no_delay.setter
    def no_delay(self, value: bool) -> None: ...
    # System.Boolean Windows.Networking.Sockets.StreamSocketListenerControl::get_KeepAlive()
    @_property
    def keep_alive(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamSocketListenerControl::put_KeepAlive(System.Boolean)
    @keep_alive.setter
    def keep_alive(self, value: bool) -> None: ...

@typing.final
class StreamSocketListenerInformation(winrt.system.Object):
    # System.String Windows.Networking.Sockets.StreamSocketListenerInformation::get_LocalPort()
    @_property
    def local_port(self) -> str: ...

@typing.final
class StreamWebSocket(winrt.system.Object, IWebSocket, windows_foundation.IClosable):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, exc_type: typing.Optional[typing.Type[BaseException]], exc_value: typing.Optional[BaseException], traceback: typing.Optional[types.TracebackType]) -> None: ...
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocket::Close()
    def close(self) -> None: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocket::Close(System.UInt16,System.String)
    def close_with_status(self, code: winrt.system.UInt16, reason: str, /) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.StreamWebSocket::ConnectAsync(Windows.Foundation.Uri)
    def connect_async(self, uri: windows_foundation.Uri, /) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocket::SetRequestHeader(System.String,System.String)
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.StreamWebSocket::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.IWebSocket,Windows.Networking.Sockets.WebSocketClosedEventArgs>)
    def add_closed(self, event_handler: windows_foundation.TypedEventHandler[IWebSocket, WebSocketClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocket::remove_Closed(Windows.Foundation.EventRegistrationToken)
    def remove_closed(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.StreamWebSocket::add_ServerCustomValidationRequested(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.StreamWebSocket,Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs>)
    def add_server_custom_validation_requested(self, event_handler: windows_foundation.TypedEventHandler[StreamWebSocket, WebSocketServerCustomValidationRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocket::remove_ServerCustomValidationRequested(Windows.Foundation.EventRegistrationToken)
    def remove_server_custom_validation_requested(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Networking.Sockets.StreamWebSocketControl Windows.Networking.Sockets.StreamWebSocket::get_Control()
    @_property
    def control(self) -> StreamWebSocketControl: ...
    # Windows.Networking.Sockets.StreamWebSocketInformation Windows.Networking.Sockets.StreamWebSocket::get_Information()
    @_property
    def information(self) -> StreamWebSocketInformation: ...
    # Windows.Storage.Streams.IInputStream Windows.Networking.Sockets.StreamWebSocket::get_InputStream()
    @_property
    def input_stream(self) -> windows_storage_streams.IInputStream: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.StreamWebSocket::get_OutputStream()
    @_property
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class StreamWebSocketControl(winrt.system.Object, IWebSocketControl2, IWebSocketControl):
    # System.Boolean Windows.Networking.Sockets.StreamWebSocketControl::get_NoDelay()
    @_property
    def no_delay(self) -> bool: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_NoDelay(System.Boolean)
    @no_delay.setter
    def no_delay(self, value: bool) -> None: ...
    # Windows.Foundation.TimeSpan Windows.Networking.Sockets.StreamWebSocketControl::get_DesiredUnsolicitedPongInterval()
    @_property
    def desired_unsolicited_pong_interval(self) -> datetime.timedelta: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_DesiredUnsolicitedPongInterval(Windows.Foundation.TimeSpan)
    @desired_unsolicited_pong_interval.setter
    def desired_unsolicited_pong_interval(self, value: datetime.timedelta) -> None: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.StreamWebSocketControl::get_ClientCertificate()
    @_property
    def client_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_ClientCertificate(Windows.Security.Cryptography.Certificates.Certificate)
    @client_certificate.setter
    def client_certificate(self, value: windows_security_cryptography_certificates.Certificate) -> None: ...
    # Windows.Foundation.TimeSpan Windows.Networking.Sockets.StreamWebSocketControl::get_ActualUnsolicitedPongInterval()
    @_property
    def actual_unsolicited_pong_interval(self) -> datetime.timedelta: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.StreamWebSocketControl::get_ServerCredential()
    @_property
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.StreamWebSocketControl::get_ProxyCredential()
    @_property
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # System.UInt32 Windows.Networking.Sockets.StreamWebSocketControl::get_OutboundBufferSizeInBytes()
    @_property
    def outbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.StreamWebSocketControl::put_OutboundBufferSizeInBytes(System.UInt32)
    @outbound_buffer_size_in_bytes.setter
    def outbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # Windows.Foundation.Collections.IVector`1<System.String> Windows.Networking.Sockets.StreamWebSocketControl::get_SupportedProtocols()
    @_property
    def supported_protocols(self) -> typing.MutableSequence[str]: ...
    # Windows.Foundation.Collections.IVector`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.StreamWebSocketControl::get_IgnorableServerCertificateErrors()
    @_property
    def ignorable_server_certificate_errors(self) -> typing.MutableSequence[windows_security_cryptography_certificates.ChainValidationResult]: ...

@typing.final
class StreamWebSocketInformation(winrt.system.Object, IWebSocketInformation2, IWebSocketInformation):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.StreamWebSocketInformation::get_BandwidthStatistics()
    @_property
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.StreamWebSocketInformation::get_LocalAddress()
    @_property
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.StreamWebSocketInformation::get_Protocol()
    @_property
    def protocol(self) -> str: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.StreamWebSocketInformation::get_ServerCertificate()
    @_property
    def server_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # Windows.Networking.Sockets.SocketSslErrorSeverity Windows.Networking.Sockets.StreamWebSocketInformation::get_ServerCertificateErrorSeverity()
    @_property
    def server_certificate_error_severity(self) -> SocketSslErrorSeverity: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.StreamWebSocketInformation::get_ServerCertificateErrors()
    @_property
    def server_certificate_errors(self) -> typing.Sequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.Certificate> Windows.Networking.Sockets.StreamWebSocketInformation::get_ServerIntermediateCertificates()
    @_property
    def server_intermediate_certificates(self) -> typing.Sequence[windows_security_cryptography_certificates.Certificate]: ...

@typing.final
class WebSocketClosedEventArgs(winrt.system.Object):
    # System.UInt16 Windows.Networking.Sockets.WebSocketClosedEventArgs::get_Code()
    @_property
    def code(self) -> winrt.system.UInt16: ...
    # System.String Windows.Networking.Sockets.WebSocketClosedEventArgs::get_Reason()
    @_property
    def reason(self) -> str: ...

@typing.final
class WebSocketError_Static(winrt._winrt.IInspectable_Static):
    # Windows.Web.WebErrorStatus Windows.Networking.Sockets.WebSocketError::GetStatus(System.Int32)
    def get_status(cls, hresult: winrt.system.Int32, /) -> windows_web.WebErrorStatus: ...

@typing.final
class WebSocketError(winrt.system.Object, metaclass=WebSocketError_Static):
    pass

@typing.final
class WebSocketKeepAlive(winrt.system.Object, windows_applicationmodel_background.IBackgroundTask):
    def __new__(cls: typing.Type[Self]) -> Self: ...
    # System.Void Windows.Networking.Sockets.WebSocketKeepAlive::Run(Windows.ApplicationModel.Background.IBackgroundTaskInstance)
    def run(self, task_instance: windows_applicationmodel_background.IBackgroundTaskInstance, /) -> None: ...

@typing.final
class WebSocketServerCustomValidationRequestedEventArgs(winrt.system.Object):
    # Windows.Foundation.Deferral Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::GetDeferral()
    def get_deferral(self) -> windows_foundation.Deferral: ...
    # System.Void Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::Reject()
    def reject(self) -> None: ...
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::get_ServerCertificate()
    @_property
    def server_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # Windows.Networking.Sockets.SocketSslErrorSeverity Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::get_ServerCertificateErrorSeverity()
    @_property
    def server_certificate_error_severity(self) -> SocketSslErrorSeverity: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::get_ServerCertificateErrors()
    @_property
    def server_certificate_errors(self) -> typing.Sequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.Certificate> Windows.Networking.Sockets.WebSocketServerCustomValidationRequestedEventArgs::get_ServerIntermediateCertificates()
    @_property
    def server_intermediate_certificates(self) -> typing.Sequence[windows_security_cryptography_certificates.Certificate]: ...

@typing.final
class _IControlChannelTriggerEventDetails: ...

class IControlChannelTriggerEventDetails(winrt._winrt.IInspectable):
    # Windows.Networking.Sockets.ControlChannelTrigger Windows.Networking.Sockets.IControlChannelTriggerEventDetails::get_ControlChannelTrigger()
    @_property
    @abstractmethod
    def control_channel_trigger(self) -> ControlChannelTrigger: ...

@typing.final
class _IControlChannelTriggerResetEventDetails: ...

class IControlChannelTriggerResetEventDetails(winrt._winrt.IInspectable):
    # System.Boolean Windows.Networking.Sockets.IControlChannelTriggerResetEventDetails::get_HardwareSlotReset()
    @_property
    @abstractmethod
    def hardware_slot_reset(self) -> bool: ...
    # Windows.Networking.Sockets.ControlChannelTriggerResetReason Windows.Networking.Sockets.IControlChannelTriggerResetEventDetails::get_ResetReason()
    @_property
    @abstractmethod
    def reset_reason(self) -> ControlChannelTriggerResetReason: ...
    # System.Boolean Windows.Networking.Sockets.IControlChannelTriggerResetEventDetails::get_SoftwareSlotReset()
    @_property
    @abstractmethod
    def software_slot_reset(self) -> bool: ...

@typing.final
class _IWebSocket: ...

class IWebSocket(windows_foundation.IClosable, winrt._winrt.IInspectable):
    # System.Void Windows.Networking.Sockets.IWebSocket::Close(System.UInt16,System.String)
    @abstractmethod
    def close_with_status(self, code: winrt.system.UInt16, reason: str, /) -> None: ...
    # Windows.Foundation.IAsyncAction Windows.Networking.Sockets.IWebSocket::ConnectAsync(Windows.Foundation.Uri)
    @abstractmethod
    def connect_async(self, uri: windows_foundation.Uri, /) -> windows_foundation.IAsyncAction: ...
    # System.Void Windows.Networking.Sockets.IWebSocket::SetRequestHeader(System.String,System.String)
    @abstractmethod
    def set_request_header(self, header_name: str, header_value: str, /) -> None: ...
    # Windows.Foundation.EventRegistrationToken Windows.Networking.Sockets.IWebSocket::add_Closed(Windows.Foundation.TypedEventHandler`2<Windows.Networking.Sockets.IWebSocket,Windows.Networking.Sockets.WebSocketClosedEventArgs>)
    @abstractmethod
    def add_closed(self, event_handler: windows_foundation.TypedEventHandler[IWebSocket, WebSocketClosedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    # System.Void Windows.Networking.Sockets.IWebSocket::remove_Closed(Windows.Foundation.EventRegistrationToken)
    @abstractmethod
    def remove_closed(self, event_cookie: typing.Union[windows_foundation.EventRegistrationToken, typing.Tuple[winrt.system.Int64]], /) -> None: ...
    # Windows.Storage.Streams.IOutputStream Windows.Networking.Sockets.IWebSocket::get_OutputStream()
    @_property
    @abstractmethod
    def output_stream(self) -> windows_storage_streams.IOutputStream: ...

@typing.final
class _IWebSocketControl: ...

class IWebSocketControl(winrt._winrt.IInspectable):
    # System.UInt32 Windows.Networking.Sockets.IWebSocketControl::get_OutboundBufferSizeInBytes()
    @_property
    @abstractmethod
    def outbound_buffer_size_in_bytes(self) -> winrt.system.UInt32: ...
    # System.Void Windows.Networking.Sockets.IWebSocketControl::put_OutboundBufferSizeInBytes(System.UInt32)
    @outbound_buffer_size_in_bytes.setter
    @abstractmethod
    def outbound_buffer_size_in_bytes(self, value: winrt.system.UInt32) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.IWebSocketControl::get_ProxyCredential()
    @_property
    @abstractmethod
    def proxy_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.IWebSocketControl::put_ProxyCredential(Windows.Security.Credentials.PasswordCredential)
    @proxy_credential.setter
    @abstractmethod
    def proxy_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Security.Credentials.PasswordCredential Windows.Networking.Sockets.IWebSocketControl::get_ServerCredential()
    @_property
    @abstractmethod
    def server_credential(self) -> windows_security_credentials.PasswordCredential: ...
    # System.Void Windows.Networking.Sockets.IWebSocketControl::put_ServerCredential(Windows.Security.Credentials.PasswordCredential)
    @server_credential.setter
    @abstractmethod
    def server_credential(self, value: windows_security_credentials.PasswordCredential) -> None: ...
    # Windows.Foundation.Collections.IVector`1<System.String> Windows.Networking.Sockets.IWebSocketControl::get_SupportedProtocols()
    @_property
    @abstractmethod
    def supported_protocols(self) -> typing.MutableSequence[str]: ...

@typing.final
class _IWebSocketControl2: ...

class IWebSocketControl2(IWebSocketControl, winrt._winrt.IInspectable):
    # Windows.Foundation.Collections.IVector`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.IWebSocketControl2::get_IgnorableServerCertificateErrors()
    @_property
    @abstractmethod
    def ignorable_server_certificate_errors(self) -> typing.MutableSequence[windows_security_cryptography_certificates.ChainValidationResult]: ...

@typing.final
class _IWebSocketInformation: ...

class IWebSocketInformation(winrt._winrt.IInspectable):
    # Windows.Networking.Sockets.BandwidthStatistics Windows.Networking.Sockets.IWebSocketInformation::get_BandwidthStatistics()
    @_property
    @abstractmethod
    def bandwidth_statistics(self) -> BandwidthStatistics: ...
    # Windows.Networking.HostName Windows.Networking.Sockets.IWebSocketInformation::get_LocalAddress()
    @_property
    @abstractmethod
    def local_address(self) -> windows_networking.HostName: ...
    # System.String Windows.Networking.Sockets.IWebSocketInformation::get_Protocol()
    @_property
    @abstractmethod
    def protocol(self) -> str: ...

@typing.final
class _IWebSocketInformation2: ...

class IWebSocketInformation2(IWebSocketInformation, winrt._winrt.IInspectable):
    # Windows.Security.Cryptography.Certificates.Certificate Windows.Networking.Sockets.IWebSocketInformation2::get_ServerCertificate()
    @_property
    @abstractmethod
    def server_certificate(self) -> windows_security_cryptography_certificates.Certificate: ...
    # Windows.Networking.Sockets.SocketSslErrorSeverity Windows.Networking.Sockets.IWebSocketInformation2::get_ServerCertificateErrorSeverity()
    @_property
    @abstractmethod
    def server_certificate_error_severity(self) -> SocketSslErrorSeverity: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.ChainValidationResult> Windows.Networking.Sockets.IWebSocketInformation2::get_ServerCertificateErrors()
    @_property
    @abstractmethod
    def server_certificate_errors(self) -> typing.Sequence[windows_security_cryptography_certificates.ChainValidationResult]: ...
    # Windows.Foundation.Collections.IVectorView`1<Windows.Security.Cryptography.Certificates.Certificate> Windows.Networking.Sockets.IWebSocketInformation2::get_ServerIntermediateCertificates()
    @_property
    @abstractmethod
    def server_intermediate_certificates(self) -> typing.Sequence[windows_security_cryptography_certificates.Certificate]: ...

