site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mutt/1.4.2.1i 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 jak@uiuc.edu | 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jay A. Kreibich