StreamWebSocket.Control Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets socket control data on a StreamWebSocket object.
public:
property StreamWebSocketControl ^ Control { StreamWebSocketControl ^ get(); };
StreamWebSocketControl Control();
public StreamWebSocketControl Control { get; }
var streamWebSocketControl = streamWebSocket.control;
Public ReadOnly Property Control As StreamWebSocketControl
Property Value
Socket control data on a StreamWebSocket object.
Remarks
The Control property gets the StreamWebSocketControl instance associated with a StreamWebSocket object.
A StreamWebSocketControl object is automatically created with the parent StreamWebSocket object. The StreamWebSocketControl instance can then be used to get or set control data used by the StreamWebSocket object. These properties on the MessageWebSocketControl instance include the following:
- NoDelay - A value that indicates whether the Nagle algorithm is used on a StreamWebSocket object.
- OutboundBufferSizeInBytes - The size, in bytes, of the send buffer to be used for sending data on a StreamWebSocket object.
- ProxyCredential - The credential to use to authenticate to the proxy server through HTTP header authentication using a StreamWebSocket object.
- ServerCredential - The credential to use to authenticate to the WebSocket server through HTTP header authentication using a StreamWebSocket object.
- SupportedProtocols - Gets a collection that can be used to add a list of supported sub-protocols that will be advertised to the server during the connect handshake.
Any changes to the StreamWebSocketControl property values must be set before the StreamWebSocket is connected. As a result if you need to make changes to the NoDelay, OutboundBufferSizeInBytes, ProxyCredential, ServerCredential, or SupportedProtocols properties, then these changes must occur before a successful call to the ConnectAsync method on the StreamWebSocket.