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