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. “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.