Dart.PowerTCP.SslSockets Namespace > Tcp Class : Proxy Property (Tcp) |
Returns the Proxy instance that controls proxy server use.
[Visual Basic]
<BrowsableAttribute(False)>
Public ReadOnly Property Proxy As Proxy
[C#]
[BrowsableAttribute(false)]
public Proxy Proxy {get;}
[C++]
[BrowsableAttribute(false)]
public: __property Proxy* get_Proxy();
[C++/CLI]
[BrowsableAttribute(false)]
public:
property Proxy^ Proxy {
Proxy^ get();
}
The Proxy object to use to control proxy server use.
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:
The following example demonstrates asynchronously connecting using the BeginConnect method.
[Visual Basic]
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#]
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());
}
}
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.