//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0008
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.idl";
import "Windows.ApplicationModel.Background.idl";
import "Windows.Networking.idl";
import "Windows.Security.Credentials.idl";
import "Windows.Storage.Streams.idl";
import "Windows.Web.idl";
// Additional imports to ensure that all required headers are included
cpp_quote("#if defined(__cplusplus)")
cpp_quote("}")
cpp_quote("#endif // defined(__cplusplus)")
cpp_quote("#include <Windows.Foundation.h>")
cpp_quote("#if !defined(__windows2Eapplicationmodel2Ebackground_h__)")
cpp_quote("#include <Windows.ApplicationModel.Background.h>")
cpp_quote("#endif // !defined(__windows2Eapplicationmodel2Ebackground_h__)")
cpp_quote("#if !defined(__windows2Enetworking_h__)")
cpp_quote("#include <Windows.Networking.h>")
cpp_quote("#endif // !defined(__windows2Enetworking_h__)")
cpp_quote("#if !defined(__windows2Esecurity2Ecredentials_h__)")
cpp_quote("#include <Windows.Security.Credentials.h>")
cpp_quote("#endif // !defined(__windows2Esecurity2Ecredentials_h__)")
cpp_quote("#if !defined(__windows2Estorage2Estreams_h__)")
cpp_quote("#include <Windows.Storage.Streams.h>")
cpp_quote("#endif // !defined(__windows2Estorage2Estreams_h__)")
cpp_quote("#if !defined(__windows2Eweb_h__)")
cpp_quote("#include <Windows.Web.h>")
cpp_quote("#endif // !defined(__windows2Eweb_h__)")
cpp_quote("#if defined(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace ApplicationModel
    {
        namespace Background
        {
            interface IBackgroundTask;

            interface IBackgroundTrigger;
        }
    }
}
namespace Windows
{
    namespace Foundation
    {
        interface IAsyncAction;

        interface IClosable;

        runtimeclass Uri;
    }
}
namespace Windows
{
    namespace Networking
    {
        runtimeclass EndpointPair;

        runtimeclass HostName;

        typedef enum HostNameSortOptions HostNameSortOptions;
    }
}
namespace Windows
{
    namespace Security
    {
        namespace Credentials
        {
            runtimeclass PasswordCredential;
        }
    }
}
namespace Windows
{
    namespace Storage
    {
        namespace Streams
        {
            runtimeclass DataReader;

            interface IBuffer;

            interface IInputStream;

            interface IOutputStream;
        }
    }
}
namespace Windows
{
    namespace Web
    {
        typedef enum WebErrorStatus WebErrorStatus;
    }
}
namespace Windows
{
    namespace Networking
    {
        namespace Sockets
        {
            typedef enum ControlChannelTriggerStatus ControlChannelTriggerStatus;

            typedef enum ControlChannelTriggerResourceType ControlChannelTriggerResourceType;

            typedef enum ControlChannelTriggerResetReason ControlChannelTriggerResetReason;

            typedef enum SocketMessageType SocketMessageType;

            typedef enum SocketProtectionLevel SocketProtectionLevel;

            typedef enum SocketQualityOfService SocketQualityOfService;

            typedef enum SocketErrorStatus SocketErrorStatus;

            typedef struct RoundTripTimeStatistics RoundTripTimeStatistics;

            typedef struct BandwidthStatistics BandwidthStatistics;

            interface IControlChannelTrigger;

            interface IControlChannelTriggerFactory;

            interface IControlChannelTriggerEventDetails;

            interface IControlChannelTriggerResetEventDetails;

            interface IDatagramSocketMessageReceivedEventArgs;

            interface IMessageWebSocketMessageReceivedEventArgs;

            interface IWebSocketClosedEventArgs;

            interface IDatagramSocketInformation;

            interface IDatagramSocketControl;

            interface IDatagramSocketStatics;

            interface IDatagramSocket;

            interface IStreamSocketInformation;

            interface IStreamSocketControl;

            interface IStreamSocket;

            interface IStreamSocketListenerControl;

            interface IStreamSocketListenerInformation;

            interface IStreamSocketListenerConnectionReceivedEventArgs;

            interface IStreamSocketListener;

            interface IWebSocketControl;

            interface IWebSocketInformation;

            interface IWebSocket;

            interface IMessageWebSocketControl;

            interface IMessageWebSocket;

            interface IStreamWebSocketControl;

            interface IStreamWebSocket;

            interface ISocketErrorStatics;

            interface IWebSocketErrorStatics;

            runtimeclass ControlChannelTrigger;

            runtimeclass DatagramSocketControl;

            runtimeclass DatagramSocketInformation;

            runtimeclass DatagramSocket;

            runtimeclass DatagramSocketMessageReceivedEventArgs;

            runtimeclass StreamSocketControl;

            runtimeclass StreamSocketInformation;

            runtimeclass StreamSocket;

            runtimeclass StreamSocketListenerControl;

            runtimeclass StreamSocketListenerInformation;

            runtimeclass StreamSocketListener;

            runtimeclass StreamSocketListenerConnectionReceivedEventArgs;

            runtimeclass WebSocketClosedEventArgs;

            runtimeclass MessageWebSocketControl;

            runtimeclass MessageWebSocketInformation;

            runtimeclass MessageWebSocket;

            runtimeclass MessageWebSocketMessageReceivedEventArgs;

            runtimeclass StreamWebSocketControl;

            runtimeclass StreamWebSocketInformation;

            runtimeclass StreamWebSocket;

            runtimeclass WebSocketKeepAlive;

            runtimeclass SocketError;

            runtimeclass WebSocketError;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Networking
    {
        namespace Sockets
        {
            declare
            {
                interface Windows.Foundation.IAsyncOperation<Windows.Networking.Sockets.StreamSocket*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.DatagramSocket*, Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.IWebSocket*, Windows.Networking.Sockets.WebSocketClosedEventArgs*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.MessageWebSocket*, Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.StreamSocketListener*, Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Networking
    {
        namespace Sockets
        {
            [version(0x06020000)]
            enum ControlChannelTriggerStatus
            {
                HardwareSlotRequested = 0,
                SoftwareSlotAllocated = 1,
                HardwareSlotAllocated = 2,
                PolicyError           = 3,
                SystemError           = 4,
                TransportDisconnected = 5,
                ServiceUnavailable    = 6
            };

            [version(0x06020000)]
            enum ControlChannelTriggerResourceType
            {
                RequestSoftwareSlot = 0,
                RequestHardwareSlot = 1
            };

            [version(0x06020000)]
            enum ControlChannelTriggerResetReason
            {
                FastUserSwitched = 0,
                LowPowerExit     = 1
            };

            [version(0x06020000)]
            enum SocketMessageType
            {
                Binary = 0,
                Utf8   = 1
            };

            [version(0x06020000)]
            enum SocketProtectionLevel
            {
                PlainSocket            = 0,
                Ssl                    = 1,
                SslAllowNullEncryption = 2
            };

            [version(0x06020000)]
            enum SocketQualityOfService
            {
                Normal     = 0,
                LowLatency = 1
            };

            [version(0x06020000)]
            enum SocketErrorStatus
            {
                Unknown                            = 0,
                OperationAborted                   = 1,
                HttpInvalidServerResponse          = 2,
                ConnectionTimedOut                 = 3,
                AddressFamilyNotSupported          = 4,
                SocketTypeNotSupported             = 5,
                HostNotFound                       = 6,
                NoDataRecordOfRequestedType        = 7,
                NonAuthoritativeHostNotFound       = 8,
                ClassTypeNotFound                  = 9,
                AddressAlreadyInUse                = 10,
                CannotAssignRequestedAddress       = 11,
                ConnectionRefused                  = 12,
                NetworkIsUnreachable               = 13,
                UnreachableHost                    = 14,
                NetworkIsDown                      = 15,
                NetworkDroppedConnectionOnReset    = 16,
                SoftwareCausedConnectionAbort      = 17,
                ConnectionResetByPeer              = 18,
                HostIsDown                         = 19,
                NoAddressesFound                   = 20,
                TooManyOpenFiles                   = 21,
                MessageTooLong                     = 22,
                CertificateExpired                 = 23,
                CertificateUntrustedRoot           = 24,
                CertificateCommonNameIsIncorrect   = 25,
                CertificateWrongUsage              = 26,
                CertificateRevoked                 = 27,
                CertificateNoRevocationCheck       = 28,
                CertificateRevocationServerOffline = 29,
                CertificateIsInvalid               = 30
            };

            [version(0x06020000)]
            struct RoundTripTimeStatistics
            {
                UINT32 Variance;
                UINT32 Max;
                UINT32 Min;
                UINT32 Sum;
            };

            [version(0x06020000)]
            struct BandwidthStatistics
            {
                UINT64 OutboundBitsPerSecond;
                UINT64 InboundBitsPerSecond;
                UINT64 OutboundBitsPerSecondInstability;
                UINT64 InboundBitsPerSecondInstability;
                boolean OutboundBandwidthPeaked;
                boolean InboundBandwidthPeaked;
            };

            [uuid(7D1431A7-EE96-40E8-A199-8703CD969EC3)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.ControlChannelTrigger)]
            interface IControlChannelTrigger : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT ControlChannelTriggerId([out] [retval] HSTRING* value);
                [propget] HRESULT ServerKeepAliveIntervalInMinutes([out] [retval] UINT32* value);
                [propput] HRESULT ServerKeepAliveIntervalInMinutes([in] UINT32 value);
                [propget] HRESULT CurrentKeepAliveIntervalInMinutes([out] [retval] UINT32* value);
                [propget] HRESULT TransportObject([out] [retval] IInspectable** value);
                [propget] HRESULT KeepAliveTrigger([out] [retval] Windows.ApplicationModel.Background.IBackgroundTrigger** trigger);
                [propget] HRESULT PushNotificationTrigger([out] [retval] Windows.ApplicationModel.Background.IBackgroundTrigger** trigger);
                HRESULT UsingTransport([in] IInspectable* transport);
                HRESULT WaitForPushEnabled([out] [retval] Windows.Networking.Sockets.ControlChannelTriggerStatus* channelTriggerStatus);
                HRESULT DecreaseNetworkKeepAliveInterval();
                HRESULT FlushTransport();
            }

            [uuid(DA4B7CF0-8D71-446F-88C3-B95184A2D6CD)]
            [exclusiveto(Windows.Networking.Sockets.ControlChannelTrigger)]
            [version(0x06020000)]
            interface IControlChannelTriggerFactory : IInspectable
            {
                [overload("CreateControlChannelTrigger")] HRESULT CreateControlChannelTrigger([in] HSTRING channelId, [in] UINT32 serverKeepAliveIntervalInMinutes, [out] [retval] Windows.Networking.Sockets.ControlChannelTrigger** notificationChannel);
                [overload("CreateControlChannelTrigger")] HRESULT CreateControlChannelTriggerEx([in] HSTRING channelId, [in] UINT32 serverKeepAliveIntervalInMinutes, [in] Windows.Networking.Sockets.ControlChannelTriggerResourceType resourceRequestType, [out] [retval] Windows.Networking.Sockets.ControlChannelTrigger** notificationChannel);
            }

            [uuid(1B36E047-89BB-4236-96AC-71D012BB4869)]
            [version(0x06020000)]
            interface IControlChannelTriggerEventDetails : IInspectable
            {
                [propget] HRESULT ControlChannelTrigger([out] [retval] Windows.Networking.Sockets.ControlChannelTrigger** value);
            }

            [uuid(6851038E-8EC4-42FE-9BB2-21E91B7BFCB1)]
            [version(0x06020000)]
            interface IControlChannelTriggerResetEventDetails : IInspectable
            {
                [propget] HRESULT ResetReason([out] [retval] Windows.Networking.Sockets.ControlChannelTriggerResetReason* value);
                [propget] HRESULT HardwareSlotReset([out] [retval] boolean* value);
                [propget] HRESULT SoftwareSlotReset([out] [retval] boolean* value);
            }

            [uuid(9E2DDCA2-1712-4CE4-B179-8C652C6D107E)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs)]
            interface IDatagramSocketMessageReceivedEventArgs : IInspectable
            {
                [propget] HRESULT RemoteAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT RemotePort([out] [retval] HSTRING* value);
                [propget] HRESULT LocalAddress([out] [retval] Windows.Networking.HostName** value);
                HRESULT GetDataReader([out] [retval] Windows.Storage.Streams.DataReader** dataReader);
                HRESULT GetDataStream([out] [retval] Windows.Storage.Streams.IInputStream** inputStream);
            }

            [uuid(478C22AC-4C4B-42ED-9ED7-1EF9F94FA3D5)]
            [exclusiveto(Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs)]
            [version(0x06020000)]
            interface IMessageWebSocketMessageReceivedEventArgs : IInspectable
            {
                [propget] HRESULT MessageType([out] [retval] Windows.Networking.Sockets.SocketMessageType* value);
                HRESULT GetDataReader([out] [retval] Windows.Storage.Streams.DataReader** dataReader);
                HRESULT GetDataStream([out] [retval] Windows.Storage.Streams.IInputStream** inputStream);
            }

            [uuid(CEB78D07-D0A8-4703-A091-C8C2C0915BC3)]
            [exclusiveto(Windows.Networking.Sockets.WebSocketClosedEventArgs)]
            [version(0x06020000)]
            interface IWebSocketClosedEventArgs : IInspectable
            {
                [propget] HRESULT Code([out] [retval] UINT16* value);
                [propget] HRESULT Reason([out] [retval] HSTRING* value);
            }

            [uuid(5F1A569A-55FB-48CD-9706-7A974F7B1585)]
            [exclusiveto(Windows.Networking.Sockets.DatagramSocketInformation)]
            [version(0x06020000)]
            interface IDatagramSocketInformation : IInspectable
            {
                [propget] HRESULT LocalAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT LocalPort([out] [retval] HSTRING* value);
                [propget] HRESULT RemoteAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT RemotePort([out] [retval] HSTRING* value);
            }

            [uuid(52AC3F2E-349A-4135-BB58-B79B2647D390)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.DatagramSocketControl)]
            interface IDatagramSocketControl : IInspectable
            {
                [propget] HRESULT QualityOfService([out] [retval] Windows.Networking.Sockets.SocketQualityOfService* value);
                [propput] HRESULT QualityOfService([in] Windows.Networking.Sockets.SocketQualityOfService value);
                [propget] HRESULT OutboundUnicastHopLimit([out] [retval] BYTE* value);
                [propput] HRESULT OutboundUnicastHopLimit([in] BYTE value);
            }

            [uuid(E9C62AEE-1494-4A21-BB7E-8589FC751D9D)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.DatagramSocket)]
            interface IDatagramSocketStatics : IInspectable
            {
                [overload("GetEndpointPairsAsync")] HRESULT GetEndpointPairsAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair*>*>** operation);
                [overload("GetEndpointPairsAsync")] HRESULT GetEndpointPairsWithSortOptionsAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [in] Windows.Networking.HostNameSortOptions sortOptions, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Networking.EndpointPair*>*>** operation);
            }

            [uuid(7FE25BBB-C3BC-4677-8446-CA28A465A3AF)]
            [exclusiveto(Windows.Networking.Sockets.DatagramSocket)]
            [version(0x06020000)]
            interface IDatagramSocket : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Control([out] [retval] Windows.Networking.Sockets.DatagramSocketControl** value);
                [propget] HRESULT Information([out] [retval] Windows.Networking.Sockets.DatagramSocketInformation** value);
                [propget] HRESULT OutputStream([out] [retval] Windows.Storage.Streams.IOutputStream** value);
                [overload("ConnectAsync")] HRESULT ConnectAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                [overload("ConnectAsync")] HRESULT ConnectWithEndpointPairAsync([in] Windows.Networking.EndpointPair* endpointPair, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT BindServiceNameAsync([in] HSTRING localServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT BindEndpointAsync([in] Windows.Networking.HostName* localHostName, [in] HSTRING localServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT JoinMulticastGroup([in] Windows.Networking.HostName* host);
                [overload("GetOutputStreamAsync")] HRESULT GetOutputStreamAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IOutputStream*>** value);
                [overload("GetOutputStreamAsync")] HRESULT GetOutputStreamWithEndpointPairAsync([in] Windows.Networking.EndpointPair* endpointPair, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IOutputStream*>** value);
                [eventadd] HRESULT MessageReceived([in] Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.DatagramSocket*, Windows.Networking.Sockets.DatagramSocketMessageReceivedEventArgs*>* eventHandler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT MessageReceived([in] EventRegistrationToken eventCookie);
            }

            [uuid(3B80AE30-5E68-4205-88F0-DC85D2E25DED)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketInformation)]
            interface IStreamSocketInformation : IInspectable
            {
                [propget] HRESULT LocalAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT LocalPort([out] [retval] HSTRING* value);
                [propget] HRESULT RemoteHostName([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT RemoteAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT RemoteServiceName([out] [retval] HSTRING* value);
                [propget] HRESULT RemotePort([out] [retval] HSTRING* value);
                [propget] HRESULT RoundTripTimeStatistics([out] [retval] Windows.Networking.Sockets.RoundTripTimeStatistics* value);
                [propget] HRESULT BandwidthStatistics([out] [retval] Windows.Networking.Sockets.BandwidthStatistics* value);
                [propget] HRESULT ProtectionLevel([out] [retval] Windows.Networking.Sockets.SocketProtectionLevel* value);
                [propget] HRESULT SessionKey([out] [retval] Windows.Storage.Streams.IBuffer** value);
            }

            [uuid(FE25ADF1-92AB-4AF3-9992-0F4C85E36CC4)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketControl)]
            interface IStreamSocketControl : IInspectable
            {
                [propget] HRESULT NoDelay([out] [retval] boolean* value);
                [propput] HRESULT NoDelay([in] boolean value);
                [propget] HRESULT KeepAlive([out] [retval] boolean* value);
                [propput] HRESULT KeepAlive([in] boolean value);
                [propget] HRESULT OutboundBufferSizeInBytes([out] [retval] UINT32* value);
                [propput] HRESULT OutboundBufferSizeInBytes([in] UINT32 value);
                [propget] HRESULT QualityOfService([out] [retval] Windows.Networking.Sockets.SocketQualityOfService* value);
                [propput] HRESULT QualityOfService([in] Windows.Networking.Sockets.SocketQualityOfService value);
                [propget] HRESULT OutboundUnicastHopLimit([out] [retval] BYTE* value);
                [propput] HRESULT OutboundUnicastHopLimit([in] BYTE value);
            }

            [uuid(69A22CF3-FC7B-4857-AF38-F6E7DE6A5B49)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocket)]
            interface IStreamSocket : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Control([out] [retval] Windows.Networking.Sockets.StreamSocketControl** value);
                [propget] HRESULT Information([out] [retval] Windows.Networking.Sockets.StreamSocketInformation** value);
                [propget] HRESULT InputStream([out] [retval] Windows.Storage.Streams.IInputStream** value);
                [propget] HRESULT OutputStream([out] [retval] Windows.Storage.Streams.IOutputStream** value);
                [overload("ConnectAsync")] HRESULT ConnectWithEndpointPairAsync([in] Windows.Networking.EndpointPair* endpointPair, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                [default_overload] [overload("ConnectAsync")] HRESULT ConnectAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                [overload("ConnectAsync")] HRESULT ConnectWithEndpointPairAndProtectionLevelAsync([in] Windows.Networking.EndpointPair* endpointPair, [in] Windows.Networking.Sockets.SocketProtectionLevel protectionLevel, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                [overload("ConnectAsync")] HRESULT ConnectWithProtectionLevelAsync([in] Windows.Networking.HostName* remoteHostName, [in] HSTRING remoteServiceName, [in] Windows.Networking.Sockets.SocketProtectionLevel protectionLevel, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT UpgradeToSslAsync([in] Windows.Networking.Sockets.SocketProtectionLevel protectionLevel, [in] Windows.Networking.HostName* validationHostName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
            }

            [uuid(20D8C576-8D8A-4DBA-9722-A16C4D984980)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketListenerControl)]
            [version(0x06020000)]
            interface IStreamSocketListenerControl : IInspectable
            {
                [propget] HRESULT QualityOfService([out] [retval] Windows.Networking.Sockets.SocketQualityOfService* value);
                [propput] HRESULT QualityOfService([in] Windows.Networking.Sockets.SocketQualityOfService value);
            }

            [uuid(E62BA82F-A63A-430B-BF62-29E93E5633B4)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketListenerInformation)]
            [version(0x06020000)]
            interface IStreamSocketListenerInformation : IInspectable
            {
                [propget] HRESULT LocalPort([out] [retval] HSTRING* value);
            }

            [uuid(0C472EA9-373F-447B-85B1-DDD4548803BA)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs)]
            interface IStreamSocketListenerConnectionReceivedEventArgs : IInspectable
            {
                [propget] HRESULT Socket([out] [retval] Windows.Networking.Sockets.StreamSocket** value);
            }

            [uuid(FF513437-DF9F-4DF0-BF82-0EC5D7B35AAE)]
            [exclusiveto(Windows.Networking.Sockets.StreamSocketListener)]
            [version(0x06020000)]
            interface IStreamSocketListener : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Control([out] [retval] Windows.Networking.Sockets.StreamSocketListenerControl** value);
                [propget] HRESULT Information([out] [retval] Windows.Networking.Sockets.StreamSocketListenerInformation** value);
                HRESULT BindServiceNameAsync([in] HSTRING localServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT BindEndpointAsync([in] Windows.Networking.HostName* localHostName, [in] HSTRING localServiceName, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                [eventadd] HRESULT ConnectionReceived([in] Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.StreamSocketListener*, Windows.Networking.Sockets.StreamSocketListenerConnectionReceivedEventArgs*>* eventHandler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT ConnectionReceived([in] EventRegistrationToken eventCookie);
            }

            [uuid(2EC4BDC3-D9A5-455A-9811-DE24D45337E9)]
            [version(0x06020000)]
            interface IWebSocketControl : IInspectable
            {
                [propget] HRESULT OutboundBufferSizeInBytes([out] [retval] UINT32* value);
                [propput] HRESULT OutboundBufferSizeInBytes([in] UINT32 value);
                [propget] HRESULT ServerCredential([out] [retval] Windows.Security.Credentials.PasswordCredential** value);
                [propput] HRESULT ServerCredential([in] Windows.Security.Credentials.PasswordCredential* value);
                [propget] HRESULT ProxyCredential([out] [retval] Windows.Security.Credentials.PasswordCredential** value);
                [propput] HRESULT ProxyCredential([in] Windows.Security.Credentials.PasswordCredential* value);
                [propget] HRESULT SupportedProtocols([out] [retval] Windows.Foundation.Collections.IVector<HSTRING>** value);
            }

            [uuid(5E01E316-C92A-47A5-B25F-07847639D181)]
            [version(0x06020000)]
            interface IWebSocketInformation : IInspectable
            {
                [propget] HRESULT LocalAddress([out] [retval] Windows.Networking.HostName** value);
                [propget] HRESULT BandwidthStatistics([out] [retval] Windows.Networking.Sockets.BandwidthStatistics* value);
                [propget] HRESULT Protocol([out] [retval] HSTRING* value);
            }

            [uuid(F877396F-99B1-4E18-BC08-850C9ADF156E)]
            [version(0x06020000)]
            interface IWebSocket : IInspectable
                requires
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT OutputStream([out] [retval] Windows.Storage.Streams.IOutputStream** value);
                HRESULT ConnectAsync([in] Windows.Foundation.Uri* uri, [out] [retval] Windows.Foundation.IAsyncAction** operation);
                HRESULT SetRequestHeader([in] HSTRING headerName, [in] HSTRING headerValue);
                [eventadd] HRESULT Closed([in] Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.IWebSocket*, Windows.Networking.Sockets.WebSocketClosedEventArgs*>* eventHandler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT Closed([in] EventRegistrationToken eventCookie);
                [overload("Close")] HRESULT CloseWithStatus([in] UINT16 code, [in] HSTRING reason);
            }

            [uuid(8118388A-C629-4F0A-80FB-81FC05538862)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.MessageWebSocketControl)]
            interface IMessageWebSocketControl : IInspectable
                requires
                    Windows.Networking.Sockets.IWebSocketControl
            {
                [propget] HRESULT MaxMessageSize([out] [retval] UINT32* value);
                [propput] HRESULT MaxMessageSize([in] UINT32 value);
                [propget] HRESULT MessageType([out] [retval] Windows.Networking.Sockets.SocketMessageType* value);
                [propput] HRESULT MessageType([in] Windows.Networking.Sockets.SocketMessageType value);
            }

            [uuid(33727D08-34D5-4746-AD7B-8DDE5BC2EF88)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.MessageWebSocket)]
            interface IMessageWebSocket : IInspectable
                requires
                    Windows.Networking.Sockets.IWebSocket,
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Control([out] [retval] Windows.Networking.Sockets.MessageWebSocketControl** value);
                [propget] HRESULT Information([out] [retval] Windows.Networking.Sockets.MessageWebSocketInformation** value);
                [eventadd] HRESULT MessageReceived([in] Windows.Foundation.TypedEventHandler<Windows.Networking.Sockets.MessageWebSocket*, Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs*>* eventHandler, [out] [retval] EventRegistrationToken* eventCookie);
                [eventremove] HRESULT MessageReceived([in] EventRegistrationToken eventCookie);
            }

            [uuid(B4F478B1-A45A-48DB-953A-645B7D964C07)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamWebSocketControl)]
            interface IStreamWebSocketControl : IInspectable
                requires
                    Windows.Networking.Sockets.IWebSocketControl
            {
                [propget] HRESULT NoDelay([out] [retval] boolean* value);
                [propput] HRESULT NoDelay([in] boolean value);
            }

            [uuid(BD4A49D8-B289-45BB-97EB-C7525205A843)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.StreamWebSocket)]
            interface IStreamWebSocket : IInspectable
                requires
                    Windows.Networking.Sockets.IWebSocket,
                    Windows.Foundation.IClosable
            {
                [propget] HRESULT Control([out] [retval] Windows.Networking.Sockets.StreamWebSocketControl** value);
                [propget] HRESULT Information([out] [retval] Windows.Networking.Sockets.StreamWebSocketInformation** value);
                [propget] HRESULT InputStream([out] [retval] Windows.Storage.Streams.IInputStream** value);
            }

            [uuid(828337F4-7D56-4D8E-B7B4-A07DD7C1BCA9)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.SocketError)]
            interface ISocketErrorStatics : IInspectable
            {
                HRESULT GetStatus([in] INT32 hresult, [out] [retval] Windows.Networking.Sockets.SocketErrorStatus* status);
            }

            [uuid(27CDF35B-1F61-4709-8E02-61283ADA4E9D)]
            [version(0x06020000)]
            [exclusiveto(Windows.Networking.Sockets.WebSocketError)]
            interface IWebSocketErrorStatics : IInspectable
            {
                HRESULT GetStatus([in] INT32 hresult, [out] [retval] Windows.Web.WebErrorStatus* status);
            }

            [activatable(Windows.Networking.Sockets.IControlChannelTriggerFactory, 0x06020000)]
            [threading(mta)]
            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass ControlChannelTrigger
            {
                [default] interface Windows.Networking.Sockets.IControlChannelTrigger;
                interface Windows.Foundation.IClosable;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass DatagramSocketControl
            {
                [default] interface Windows.Networking.Sockets.IDatagramSocketControl;
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            runtimeclass DatagramSocketInformation
            {
                [default] interface Windows.Networking.Sockets.IDatagramSocketInformation;
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [activatable(0x06020000)]
            [version(0x06020000)]
            [static(Windows.Networking.Sockets.IDatagramSocketStatics, 0x06020000)]
            runtimeclass DatagramSocket
            {
                [default] interface Windows.Networking.Sockets.IDatagramSocket;
                interface Windows.Foundation.IClosable;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass DatagramSocketMessageReceivedEventArgs
            {
                [default] interface Windows.Networking.Sockets.IDatagramSocketMessageReceivedEventArgs;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamSocketControl
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketControl;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamSocketInformation
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketInformation;
            }

            [threading(both)]
            [version(0x06020000)]
            [marshaling_behavior(agile)]
            [activatable(0x06020000)]
            runtimeclass StreamSocket
            {
                [default] interface Windows.Networking.Sockets.IStreamSocket;
                interface Windows.Foundation.IClosable;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamSocketListenerControl
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketListenerControl;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamSocketListenerInformation
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketListenerInformation;
            }

            [version(0x06020000)]
            [activatable(0x06020000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass StreamSocketListener
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketListener;
                interface Windows.Foundation.IClosable;
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            runtimeclass StreamSocketListenerConnectionReceivedEventArgs
            {
                [default] interface Windows.Networking.Sockets.IStreamSocketListenerConnectionReceivedEventArgs;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass WebSocketClosedEventArgs
            {
                [default] interface Windows.Networking.Sockets.IWebSocketClosedEventArgs;
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            runtimeclass MessageWebSocketControl
            {
                [default] interface Windows.Networking.Sockets.IMessageWebSocketControl;
                interface Windows.Networking.Sockets.IWebSocketControl;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass MessageWebSocketInformation
            {
                [default] interface Windows.Networking.Sockets.IWebSocketInformation;
            }

            [version(0x06020000)]
            [activatable(0x06020000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass MessageWebSocket
            {
                [default] interface Windows.Networking.Sockets.IMessageWebSocket;
                interface Windows.Networking.Sockets.IWebSocket;
                interface Windows.Foundation.IClosable;
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            runtimeclass MessageWebSocketMessageReceivedEventArgs
            {
                [default] interface Windows.Networking.Sockets.IMessageWebSocketMessageReceivedEventArgs;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamWebSocketControl
            {
                [default] interface Windows.Networking.Sockets.IStreamWebSocketControl;
                interface Windows.Networking.Sockets.IWebSocketControl;
            }

            [marshaling_behavior(agile)]
            [version(0x06020000)]
            runtimeclass StreamWebSocketInformation
            {
                [default] interface Windows.Networking.Sockets.IWebSocketInformation;
            }

            [activatable(0x06020000)]
            [threading(both)]
            [version(0x06020000)]
            [marshaling_behavior(agile)]
            runtimeclass StreamWebSocket
            {
                [default] interface Windows.Networking.Sockets.IStreamWebSocket;
                interface Windows.Networking.Sockets.IWebSocket;
                interface Windows.Foundation.IClosable;
            }

            [activatable(0x06020000)]
            [version(0x06020000)]
            [threading(both)]
            [marshaling_behavior(agile)]
            runtimeclass WebSocketKeepAlive
            {
                [default] interface Windows.ApplicationModel.Background.IBackgroundTask;
            }

            [version(0x06020000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            [static(Windows.Networking.Sockets.ISocketErrorStatics, 0x06020000)]
            runtimeclass SocketError
            {
            }

            [static(Windows.Networking.Sockets.IWebSocketErrorStatics, 0x06020000)]
            [version(0x06020000)]
            [marshaling_behavior(agile)]
            [threading(both)]
            runtimeclass WebSocketError
            {
            }
        }
    }
}
