Deze inhoud is niet beschikbaar in uw taal, maar wel in het Engels.

TcpClient.Active Property


Gets or set a value that indicates whether a connection has been made.

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

protected bool Active { get; set; }

Property Value

Type: System.Boolean

true if the connection has been made; otherwise, false.

Classes deriving from TcpClient can use this property to determine if a connection attempt has succeeded. It does not monitor the ongoing connection state of TcpClient. If the remote host closes the connection, Active will not be updated. If you are deriving from TcpClient and require closer attention to the connection state, use the Connected property of the Socket returned by the Client method.

.NET Framework
Available since 1.1
Return to top