StreamSocketListener class

Expand
This topic has not yet been rated - Rate this topic

StreamSocketListener class

[This documentation is preliminary and is subject to change.]

Applies to: Metro style apps | desktop apps

Supports listening for an incoming network connection using a TCP stream socket.

Syntax


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

Attributes

ActivatableAttribute(NTDDI_WIN8)
DualApiPartitionAttribute()
MarshalingBehaviorAttribute(Agile)
ThreadingAttribute(Both)
VersionAttribute(NTDDI_WIN8)

Members

The StreamSocketListener class has these types of members:

Constructors

The StreamSocketListener class has these constructors.

ConstructorDescription
StreamSocketListener Creates a new StreamSocketListener object.

 

Events

The StreamSocketListener class has these events.

EventDescription
ConnectionReceived An event that indicates that a connection was received on the StreamSocketListener object.

 

Methods

The StreamSocketListener class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
BindEndpointAsync Starts a bind operation on a StreamSocketListener to a local hostname and a local service name.
BindServiceNameAsync Starts a bind operation on a StreamSocketListener to a local service name.
Close Closes the StreamSocketListener object.

 

Properties

The StreamSocketListener class has these properties.

PropertyAccess typeDescription

Control

Read-onlyGets socket control data on a StreamSocketListener object.

Information

Read-onlyGets socket information for the StreamSocketListener object.

 

Remarks

The StreamSocketListener class supports listening for an incoming network connection using a TCP stream socket and accepting the connection.

The typical order of operations is as follows:

Requirements

Minimum supported client

Windows 8 Release Preview

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

internetClientServer
privateNetworkClientServer

See also

How to use advanced socket controls
IClosable
Object
StreamSocket
StreamSocketListenerConnectionReceivedEventArgs
StreamSocketListenerControl
StreamSocketListenerInformation

 

 

Build date: 5/22/2012

Did you find this helpful?
(1500 characters remaining)
Community Additions ADD