IWebSocket interface

Applies to Windows and Windows Phone

Provides access to network communication that allows reading and writing using a WebSocket.

Syntax


public interface IWebSocket : IDisposable

Attributes

[Version(0x06020000)]

Members

The IWebSocket interface has these types of members:

Events

The IWebSocket interface has these events.

EventDescription
Closed Occurs when a close frame is received on the IWebSocket object as part of the close handshake.

 

Methods

The IWebSocket interface has these methods. It also inherits methods from the Object class.

MethodDescription
Close Closes the IWebSocket.
ConnectAsync Starts an asynchronous operation to connect to a remote network destination on a IWebSocket object.
SetRequestHeader Adds an HTTP request header to the HTTP request message used in the WebSocket protocol handshake by the IWebSocket object.

 

Properties

The IWebSocket interface has these properties.

PropertyAccess typeDescription

OutputStream

Read-onlyGets the output stream to write to the remote network destination on a IWebSocket object.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

See also

IClosable
MessageWebSocket
StreamWebSocket

 

 

Show:
© 2014 Microsoft