xHarbour Reference Documentation > Function Reference |
Establishes a sockets connection to a server using the IP address.
INetConnectIP( <cIPAddress>, <nPort> ) --> pSocket or INetConnectIP( <cIPAddress>, <nPort>, <pSocket> ) --> NIL
If called with two parameters, the return value is a pointer to a socket. If a socket is passed as third parameter, the return value is NIL.
INetConnectIP() does the same as INetConnect() except for not resolving the IP address from the server's URL, or DNS name. INetConnectIP() accepts only the IP address of the server in dottet notation. Therefore, the function is thread safe and can be called simultaneously in multiple threads.
If the connection is successfully established, the socket can be used for sending and receiving data to/from the server. If the connection fails, the cause of failure can be detected with INetErrorCode().
See also: | INetAccept(), INetCreate(), INetConnect(), INetDGram(), INetInit(), INetRecv(), INetSend() |
Category: | Internet functions , Sockets functions , xHarbour extensions |
Source: | vm\inet.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com