Re: [APPL:DarwinDev] Re: My IP Address
Re: [APPL:DarwinDev] Re: My IP Address
- Subject: Re: [APPL:DarwinDev] Re: My IP Address
- From: "Jay A. Kreibich" <email@hidden>
- Date: Tue, 30 Nov 2004 15:30:11 -0600
On Tue, Nov 30, 2004 at 08:58:42PM +0000, Mark Gilbert scratched on the wall:
> So, first of all, I would like to have a status window in my app's
> GUI which tells a local user which address they need to enter
> remotely to control the app (without having to look elsewhere in the
> computer to find it).
That's a really good reason, although I might try to probe for the
hostname, rather than just the IP address. If a machine has multiple
interfaces (== multiple IP addresses) things can get complex.
> Also, I am creating (in C) an HTML web page with a 'refresh' line, to
> make the page automatically reload every 2 seconds (to generate a
> live update of status). In order to do that I have to code my own IP
> address into the HTML which I return to the client.
If you just want the system to reload the same page, you don't need
any URL. Just say "Refresh: 2" or whatever, and it will reload the
same URL.
If you must use a different URL, you can usually grab the hostname
from the "Host:" header in the HTTP 1.1 request. That's kind of
cheating, but it would likely work well. Failing that, use the
hostname.
Two seconds is a bit quick, BTW, especially on a browser like Safari
that delays the page rendering on downloads.
-j
--
Jay A. Kreibich | Comm. Technologies, R&D
email@hidden | Campus IT & Edu. Svcs.
<http://www.uiuc.edu/~jak> | University of Illinois at U/C
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden