StreamWebSocket.SetRequestHeader Method

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

Syntax

public:
void SetRequestHeader(
         String^ headerName,
         String^ headerValue
)  

Parameters

headerName
Type: String 

  The name of the request header.

headerValue
Type: String 

  The value of the request header.

Remarks

The SetRequestHeader method must be called prior to calling the ConnectAsync method. Calling the SetRequestHeader method after calling the ConnectAsync method will result in an error.

Requirements

Namespace: Windows.Networking.Sockets

Metadata: windows.winmd

See also

Reference

StreamWebSocket Class

StreamWebSocket Members

Windows.Networking.Sockets Namespace