hb_inetConnectIP()

HB_INETCONNECTIP()

Connect to a remote server by IP address

Syntax

      HB_INETCONNECTIP( <cAddress>, <nPort> ) -> SOCKET

      HB_INETCONNECTIP( <cAddress>, <nPort>, <socket> ) -> NIL

Arguments

<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

Harbour

Advertisements

3 responses to “hb_inetConnectIP()

  1. Pingback: Harbour All Functions – H | Viva Clipper !

  2. Pingback: Harbour inet Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s