Richard Heathfield <rj*@see.sig.invalidwrote in message
news:zK******************************@bt.com...
Bill Reid said:
Richard Heathfield <rj*@see.sig.invalidwrote in message
news:HY*********************@bt.com...
santosh said:
rup wrote:
Hello,
This is my first application on socket programming in vc++. I am
facing problem that how to make connection to server, & make
GET/POST
request by HTTP.
Please help me. Its urgent....
Thanks
Since this is a Microsoft specific question,
The fact that he's using VC++ is less significant, I think, than the
fact
that he's trying to learn how to do network programming. His best bet
is
to
learn about sockets from "Unix Network Programming", with the minor
tweaks needed for getting it to work under Windows being a valuable
part
of the learning experience.
Don't think so, dude...
Just because he THINKS his problem has to do with "socket
programming", what he specifically said he wanted to do was
"make a connection to a server, & GET/POST request by
HTTP".
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!
This again is the old idea of somebody asking "how do I drive
to Chicago?", you tell them to learn how to cast an engine block...
No, it isn't,
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?
---
William Ernest Reid