IWebSocket IWebSocket IWebSocket IWebSocket IWebSocket Interface

Definition

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

public : interface IWebSocket : IClosable
struct winrt::Windows::Networking::Sockets::IWebSocket : IClosable
public interface IWebSocket : IDisposable
Public Interface IWebSocket Implements IDisposable
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Inheritance
IDisposableIDisposableIDisposable
IWebSocketIWebSocketIWebSocketIWebSocketIWebSocket
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

OutputStream OutputStream OutputStream OutputStream OutputStream

Gets the output stream to write to the remote network destination on a IWebSocket object.

Methods

Close Close Close Close Close

Releases system resources that are exposed by a Windows Runtime object.

.NET This interface appears as System.IDisposable.

C++/CX This interface appears as Platform::IDisposable.

(Inherited from IClosable)
Close(UInt16, String) Close(UInt16, String) Close(UInt16, String) Close(UInt16, String) Close(UInt16, String)

Closes the IWebSocket.

ConnectAsync(Uri) ConnectAsync(Uri) ConnectAsync(Uri) ConnectAsync(Uri) ConnectAsync(Uri)

Starts an asynchronous operation to connect to a remote network destination on a IWebSocket object.

SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String) SetRequestHeader(String, String)

Adds an HTTP request header to the HTTP request message used in the WebSocket protocol handshake by the IWebSocket object.

Events

Closed Closed Closed Closed Closed

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

See Also