Listen Method

Socket.Listen Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Listens for incoming connection attempts.

Namespace:  System.Net.Sockets
Assembly:  System.Net (in System.Net.dll)

public void Listen(
	int backlog
)

Parameters

backlog
Type: System.Int32
The maximum length of the pending connections queue.

ExceptionCondition
SocketException

An error occurred when attempting to access the socket. If you receive a SocketException, use the SocketException.ErrorCode property to obtain the specific error code.

ObjectDisposedException

The Socket has been closed.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft