Avaliação do Usuário

Estrela inativaEstrela inativaEstrela inativaEstrela inativaEstrela inativa


Connect to a remote server by IP address
hb_inetConnectIP( <cAddress>, <nPort> ) -> SOCKET
hb_inetConnectIP( <cAddress>, <nPort>, <socket> ) -> NIL
(First form) INET socket
(Second form has no return value)
Connects to a remote server described by cAddress, that can be specified only in quad dot IPV4 notation (e.g. ""), 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.

This is Harbour specific