Subject: Re: TCL for perl's gethostbyname? - DN [1]
tpoindex@nyx10.nyx.net (Tom Poindexter) - 11 May 1999 - comp.lang.tcl
In article <3738A705.41279692@scriptics.com>,
Scott Redman <redman@scriptics.com> wrote:
>Use the TclX extension, there is command "host_info":
>
> package require Tclx
> host_info addresses [info hostname]
>
>(is there an easier way?)
Not easier, but different, the Scotty extension:
package require Tmn
set hostip [dns address $host]
With pure Tcl, you can get the IP after you connect to a TCP port
on the target hostname:
% set sock [socket www.scriptics.com 80]
% puts [fconfigure $sock -peername]
205.149.189.25 www.scriptics.com 80
Scotty is a way cool extension, if you're doing much in the way of
network programming, you'll want it. See FAQ for pointers to
source. Windows version exists for both TclX and Scotty.
--
Tom Poindexter
tpoindex@nyx.net
http://www.nyx.net/~tpoindex/
Last modified
1999-09-27
1999-09-27
(195.108.246.50)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
