Gets the connected state of the connection.
Syntax
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As Pop
Dim value As Boolean
value = instance.Connected |
Property Value
true if the TCP connection is connected to a remote resource and authenticated; otherwise, false.
Example
The following example demonstrates a logout procedure for the Pop component.
| Visual Basic | Copy Code |
|---|
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.
Private Sub PopLogout()
' Check to see if currently connected before logging out.
If Pop1.Connected Then
' Attempt to log out gracefully.
Try
Pop1.Logout()
Catch ex As Exception
' Logout failed. Just abruptly close.
Pop1.Dispose()
End Try
End If
End Sub |
| C# | Copy Code |
|---|
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.
// Check to see if currently connected before logging out.
if(pop1.Connected)
{
// Attempt to log out gracefully.
try
{
pop1.Logout();
}
catch(Exception ex)
{
// Logout failed. Just abruptly close.
pop1.Dispose();
}
} |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0
See Also