PowerTCP Mail for .NET
Connect(String,Int32,String,Int32,Int32) Method
See Also  Send comments on this topic.
Dart.PowerTCP.Mail Namespace > Tcp Class > Connect Method : Connect(String,Int32,String,Int32,Int32) Method




server
Remote hostname or address in dot notation.
serverPort
Remote port, a number between 1 and 65535, inclusive.
client
Optional local hostname or address in dot notation. Use "" as default.
clientPortMin
The minimum client port number to use as a local interface.
clientPortMax
The maximum client port number to use as a local interface.
Connect to a host, specifying the local interface and a range of local ports to use.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Connect to a server using a specific interface and port range.")>
Public Overloads Overridable Sub Connect( _
   ByVal server As String, _
   ByVal serverPort As Integer, _
   ByVal client As String, _
   ByVal clientPortMin As Integer, _
   ByVal clientPortMax As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As Tcp
Dim server As String
Dim serverPort As Integer
Dim client As String
Dim clientPortMin As Integer
Dim clientPortMax As Integer
 
instance.Connect(server, serverPort, client, clientPortMin, clientPortMax)
C# 
[DescriptionAttribute("Connect to a server using a specific interface and port range.")]
public virtual void Connect( 
   string server,
   int serverPort,
   string client,
   int clientPortMin,
   int clientPortMax
)
Managed Extensions for C++ 
[DescriptionAttribute("Connect to a server using a specific interface and port range.")]
public: virtual void Connect( 
   string* server,
   int serverPort,
   string* client,
   int clientPortMin,
   int clientPortMax
) 
C++/CLI 
[DescriptionAttribute("Connect to a server using a specific interface and port range.")]
public:
virtual void Connect( 
   String^ server,
   int serverPort,
   String^ client,
   int clientPortMin,
   int clientPortMax
) 

Parameters

server
Remote hostname or address in dot notation.
serverPort
Remote port, a number between 1 and 65535, inclusive.
client
Optional local hostname or address in dot notation. Use "" as default.
clientPortMin
The minimum client port number to use as a local interface.
clientPortMax
The maximum client port number to use as a local interface.

Remarks

The Tcp.Connect method establishes a network connection between the specified local network interface/port and the device identified by remote network address/port. If no exception is thrown, the connection has succeeded and the Tcp.Connected property will return true after this method returns. Once the connection has been made, you can send/receive data to/from the server.

This method always blocks until the attempted connection succeeds or fails.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

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