By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,262 Members | 1,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,262 IT Pros & Developers. It's quick & easy.

connection to server, & make GET/POST request in vc++

P: n/a
rup
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

Jan 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"rup" <rt*********@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
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
OT in comp.lang.c++ but I"m feeling generous.

A windows socket class:
http://www.adp-gmbh.ch/win/misc/sockets.html

In use I am using this to request a HTTP file:
Socket->SendLine(( HeaderOnly ? "HEAD " : "GET " ) + DLFileName + "
HTTP/1.0");
Socket->SendLine("Host: " + Host);
Socket->SendLine("");

Any other questions, please ask in a VC++ newsgroup.
Jan 6 '07 #2

P: n/a
rup

Jim Langston wrote:
"rup" <rt*********@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
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

OT in comp.lang.c++ but I"m feeling generous.

A windows socket class:
http://www.adp-gmbh.ch/win/misc/sockets.html

In use I am using this to request a HTTP file:
Socket->SendLine(( HeaderOnly ? "HEAD " : "GET " ) + DLFileName + "
HTTP/1.0");
Socket->SendLine("Host: " + Host);
Socket->SendLine("");

Any other questions, please ask in a VC++ newsgroup.
Thanks Jim Langston for your reply. But can u give me some clear idea .
Here is my code for your consideration.
CSocket m_SockClient;
m_SockClient.Create();
BOOL success =FALSE;
success = m_SockClient.Connect("192.168.6.50",80);
if(success ==TRUE)
{ AfxMessageBox("connection established");
}

By doing this connection is established but I am not getting how to
make GET request via HTTP.
I will also send this message on vc++ group. Sorry for your inconvience.

Jan 6 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.