Udostępnij za pośrednictwem


IWebSocket Interface

Definition

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

public interface class IWebSocket : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4168563055, 39345, 19992, 188, 8, 133, 12, 154, 223, 21, 110)]
struct IWebSocket : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(4168563055, 39345, 19992, 188, 8, 133, 12, 154, 223, 21, 110)]
public interface IWebSocket : System.IDisposable
Public Interface IWebSocket
Implements IDisposable
Derived
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

OutputStream

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

Methods

Close(UInt16, String)

Closes the IWebSocket.

ConnectAsync(Uri)

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

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

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

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

Applies to

See also