xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

INetAddress()

Determines the internet address of a remote station.

Syntax

INetAddress( <pSocket> ) --> cInternetAddress

Arguments

<pSocket>
This is a pointer to a socket.

Return

The function returns a character string holding the internet address of the remote station in quad dot notation (e.g. "192.168.1.145").

Description

Function INetAddress() accepts a socket and determines the internet address of the internet connection.

Info

See also:INetAccept(), INetConnect(), INetDGram(), INetPort(), INetGetHosts()
Category: Internet functions , Sockets functions , xHarbour extensions
Source:vm\inet.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays the internet address of www.xHarbour.com

   PROCEDURE Main
      LOCAL pSocket

      INetInit()

      pSocket := INetConnect( "www.xharbour.com", 80 )

      ? INetAddress( pSocket )   // result: 193.239.210.10

      INetClose( pSocket )
      INetCleanUp()
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe