0 out of 1 rated this helpful - Rate this topic

StreamSocketListenerControl class

Applies to Windows and Windows Phone

Provides socket control data on a StreamSocketListener object.

Syntax


var streamSocketListenerControl = StreamsocketListener.Control;

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The StreamSocketListenerControl class has these types of members:

Methods

The StreamSocketListenerControl class inherits methods from the Object class (C#/VB/C++).

Properties

The StreamSocketListenerControl class has these properties.

PropertyAccess typeDescription

QualityOfService

Read/writeThe quality of service to be set on a StreamSocket object created when a connection is received by the StreamSocketListener object.

 

Remarks

The StreamSocketListenerControl class provides access to advanced socket control data on a StreamSocketListener object. The only control data supported is the QualityOfService property which indicates the quality of service to be set on a StreamSocket object created when a connection is received by the StreamSocketListener object.

A StreamSocketListenerControl object is automatically created with the parent StreamSocketListener object. The StreamSocketListener.Control property provides access to the associated StreamSocketListenerControl object.

The following example creates a StreamSocketListener, and then demonstrates how to set the QualityOfService property to LowLatency. After this is done, the app can bind and listen on the StreamSocketListener.


var listenerSocket = new Windows.Networking.Sockets.StreamSocketListener();

// Get the current setting for this option
// This isn't required, but it shows how to get the current setting
var currentSetting = listenerSocket.Control.QualityOfService; 

// Set QualityOfService to lowLatency
listenerSocket.Control.QualityOfService = SocketQualityOfService.lowLatency;
   
// Now you can call the BindServiceNameAsync or BindEndpointAsync method to listen for connections.


Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

Other resources
How to use advanced socket controls (Windows Store apps using JavaScript and HTML)
How to use advanced socket controls (Windows Store apps using C#/VB/C++ and XAML)
Reference
Object
StreamSocketListener
StreamSocketListener.Control

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.