Discuss this help topic in SecureBlackbox Forum

TElSocket.Connect

TElSocket     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Establishes connection to the remote server.

Declaration

[C#]
    int Connect(int Timeout);

[VB.NET]
    Function Connect(ByVal Timeout As Integer) As Integer

[Pascal]
    function Connect(Timeout : integer) : integer;

[C++]
    int32_t Connect(int32_t Timeout);

[PHP]
    integer Connect(integer $Timeout)

[Java]
    int connect(int Timeout);

Parameters

  • Timeout - connection timeout in milliseconds. The value set to -1 means infinite timeout, set to 0 means no waiting at all.

Return value

    Returns 0 if the connection was established, and socket error code otherwise.
    In .NET, if an exception has been raised, -1 may be returned.

Description

    Use this method to establish connection to the remote server. The remote address is specified by the Address property. This method checks, whether UseSocks or UseWebTunneling is specified, and establishes the connection via a SOCKS or an HTTP Proxy server.

See also:     AsyncConnect     Close     Address     UseSocks     UseWebTunneling    

Discuss this help topic in SecureBlackbox Forum