PowerTCP Mail for .NET
Proxy Property
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Tcp Class : Proxy Property




Returns the Proxy instance that controls proxy server use.

Syntax

Visual Basic (Declaration) 
<BrowsableAttribute(False)>
Public ReadOnly Property Proxy As Proxy
Visual Basic (Usage)Copy Code
Dim instance As Tcp
Dim value As Proxy
 
value = instance.Proxy
C# 
[BrowsableAttribute(false)]
public Proxy Proxy {get;}
Managed Extensions for C++ 
[BrowsableAttribute(false)]
public: __property Proxy* get_Proxy();
C++/CLI 
[BrowsableAttribute(false)]
public:
property Proxy^ Proxy {
   Proxy^ get();
}

Property Value

The Proxy object to use to control proxy server use.

Example

The following example demonstrates asynchronously connecting using the BeginConnect method.
Visual BasicCopy Code
Private Sub Test()
   ' Begin to asynchronously connect to an echo port.
   Tcp1.BeginConnect("atropos", 7)
End Sub

Private Sub Tcp1_EndConnect(ByVal sender As Object, ByVal e As ExceptionEventArgs) Handles Tcp1.EndConnect
   ' Connect complete, check for any exceptions
   If e.Exception Is Nothing Then
      ' Now send some data.
      Tcp1.Send("hello")

      ' Receive the data back.
      Dim seg As Segment = Tcp1.Receive()
      Debug.WriteLine(seg.ToString())
   End If
End Sub
C#Copy Code
private void Test()
{
   // Begin to asynchronously connect to an echo port.
   tcp1.BeginConnect("atropos", 7);
}

private void tcp1_EndConnect(object sender, ExceptionEventArgs e)
{
   // Connect complete, check for any exceptions
   if(e.Exception == null)
   {
      // Now send some data.
      tcp1.Send("hello");

      // Receive the data back.
      Segment seg = tcp1.Receive();

      Debug.WriteLine(seg.ToString());
   }
}

Remarks

Some networks are configured to require your use of an TCP proxy server. PowerTCP supports most types. Configure your proxy use by specifying the properties of this Proxy object.

Use the Tcp.Proxy property if your application needs to connect with one of the following proxies:

  • SOCKS v4
  • SOCKS v5

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 3.2
© 2010 Dart Communications. All Rights Reserved.