Re: Accessing web with a C program
- From: rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos)
- Date: Thu, 15 Feb 2007 14:05:52 GMT
Keith Thompson <kst-u@xxxxxxx> wrote:
rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos) writes:
This is very different from opening a URL, because that involves making
a connection to a random machine on the 'net, and possibly getting the
user to enter dialing passwords and all.
It's not obvious that fopen() should support the NFS protocol but not
the HTTP protocol.
Again: it is not fopen() which supports this in the first place. fopen()
gives you what it gets from the OS. To suggest that the C library
_should_ bypass the OS and support HTTP (how!?) when the OS only gives
you NFS as normal files is, IMO, rather weird.
It's also possible, on some operating systems, to create a filesystem
that maps URLs to what appear to be local file names. On such a
system, fopen("http://google.com", "r") would invoke code in the
filesystem driver that would access google.com using the HTTP
protocol, but that would be invisible to the program that calls
fopen(). Given this capability letting fopen() accept URLs directly
is just a matter of doing the net access at a different level.
Exactly: _if_ the OS gives you that. It's not fopen() doing this.
fopen() is just a gateway between your program and what the OS provides.
Richard
.
- Follow-Ups:
- Re: Accessing web with a C program
- From: Richard Tobin
- Re: Accessing web with a C program
- From: Chris Dollin
- Re: Accessing web with a C program
- References:
- Accessing web with a C program
- From: Neo
- Re: Accessing web with a C program
- From: Lew Pitcher
- Re: Accessing web with a C program
- From: Christopher Benson-Manica
- Re: Accessing web with a C program
- From: Lew Pitcher
- Re: Accessing web with a C program
- From: Richard Bos
- Re: Accessing web with a C program
- From: Keith Thompson
- Accessing web with a C program
- Prev by Date: Re: Accessing web with a C program
- Next by Date: Re: Requesting advice how to clean up C code for validating string represents integer
- Previous by thread: Re: Accessing web with a C program
- Next by thread: Re: Accessing web with a C program
- Index(es):
Relevant Pages
|