tcplistener_object.Pending Property

Gets a Boolean value that indicates if there are any TCP connection requests pending.

...tcplistener_object.Pending

Prerequisites

The TCP listener associated with the tcplistener_object must have already been started.

Parameters

None

Remarks

This property is used by a TCP server to test if there are any pending connection requests for a TcpListener Object. If so, it returns True. Otherwise it returns False. If there is a pending request, call the AcceptSocket method to accept it.

If any network errors occur, this property returns False.

Examples

Dim tl As New TcpListener(ep)    ' Create listener object
Dim sock As Socket
tl.Start
If tl.Pending Then
sock = tl.AcceptSocket
End If

See Also

Networking Classes | tcplistener_object.AcceptSocket