Avaliação do Usuário

Estrela inativaEstrela inativaEstrela inativaEstrela inativaEstrela inativa
 

hb_inetConnectIP()

Connect to a remote server by IP address
Syntax
hb_inetConnectIP( <cAddress>, <nPort> ) -> SOCKET
hb_inetConnectIP( <cAddress>, <nPort>, <socket> ) -> NIL
Argument(s)
<cAddress>
<nPort>
<socket>
Returns
(First form) INET socket
(Second form has no return value)
Description
Connects to a remote server described by cAddress, that can be specified only in quad dot IPV4 notation (e.g. "127.0.0.1"), using the desired port. This version of hb_inetConnect() does not use gethostbyname, and thus is thread safe and can be used in combination with hb_inetGetHosts() to have a finer timeout control while connecting to a server, and a finer error control.
The second version of this function accepts a pre-built socket as a parameter. This allows to kill asyncronously a thread waiting for hb_inetConnectIP() to connect, and then cleaning up the leftover socket data. Also, it is possible to give timeout at the given SOCKET.
On error, the error of the returned socket is set.
Compliance

This is Harbour specific