TTCPBlockSocket.Connect
TTCPBlockSocket     

procedure Connect(IP, Port: string); override;

Unit
blcksock

Description
Connects socket to remote IP address and PORT. The same rules as with BIND method are valid. The only exception is that PORT with 0 value will not be connected.

After call to this method a communication channel between local and remote socket is created. Local socket is assigned automatically if not controlled by previous call to BIND method.

Structures LocalSin and RemoteSin will be filled with valid values.

If you use SOCKS5, activate outgoing TCP connection by SOCKS5 proxy specified in SocksIP. (By CONNECT method of SOCKS5.)

If you use HTTP-tunnel mode, activate outgoing TCP connection by HTTP tunnel specified in HTTPTunnelIP. (By CONNECT method of HTTP protocol.)

If you additionally use SSL mode, then SSL/TLS session is started.

Structures LocalSin and RemoteSin will be filled with valid values.

Note: If you call this on non-created socket, then socket is created automaticly.


See also:
HTTPTunnelIP