Richard Heathfield said:
Bill Reid said:
He also made it very clear that he wants to write a sockets-based program.
Anything you do with a network on a Unix or Windows box
is going to involve "sockets"! (Unless you choose to reinvent
THAT wheel too!) That doesn't mean you have to actually
deal with "sockets", any more than you have to deal with any
particular network card driver that will also be involved "under
the hood" when you write a networking application!
If this is a class exercise (which of course, it may very well
be), then his "urgent" request is gonna take at least a little while
to resolve, because as you note he first has to learn the general
concepts of "sockets", then he has to implement a specific
library (in this case, "winsock"), then he has to learn the HTTP
protocol, then he has to implement the whole friggin' HTTP protocol
from the ground up using his "sockets" library!
Considering there are goofballs out there who clearly haven't
been able to figure out how to do this as a "community effort"
for the better part of a decade, that's a hell of an "urgent" homework
assignment!
You don't KNOW that. A lot of people get confused when trying
to write an application that gets (or "posts") stuff using HTTP, they
mistakenly think that they DO have to implement it "from the ground
up" starting with the "sockets" library (I myself thought that for
several years, because it WAS true for several years)...if that's the
case, I'm just giving him the quickest ("urgent") way to solve the
problem...just tryin' to be helpful, is all...
and you have made that mistake more than once. It's more like
teaching them how to drive (program sockets) and then giving them a route
map (the HTTP RFC).
My analogy was apt, yours is a little more conceptually inept...teaching
somebody to "program sockets" is more like teaching somebody the
general concepts of assembly line manufacturing, then handing them a
set of "blueprints" (HTTP) for a car you want them to manufacture...but
it could have been a jet plane, or a train locomotive, or a golf cart...
Let me try to clear it up for you. His question is actually equivalent to:
"Hello,
This is my first application on I/O programming in C. I am
facing problem how to make connection to terminal,
& get words from user keyboard and send words to user screen.
Please help me. Its urgent...."
Now tell me: how you would answer THAT question?