Active 属性
此文章由机器翻译。 将光标移到文章的句子上,以查看原文。 更多信息。
译文
原文

TcpClient.Active 属性

 

获取或设置一个值,该值指示是否已建立连接。

命名空间:   System.Net.Sockets
程序集:  System(System.dll 中)

protected bool Active { get; set; }

属性值

Type: System.Boolean

如果已建立连接,则为 true;否则为 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
1.1 后可用
返回页首
显示:
© 2016 Microsoft