March 8th, 2004, 07:23 PM
Problem with CSocket and CArchive
I wantted to use CSocket to send and receive data with a HTTP sever. If I wrote it as:
szOut = "GET http://...../ HTTP/1.0\n\n"
It would be no problem and receive a "200 OK" status in szIn.
But if I wrote it as:
CArchive arIn(&SocketFile, CArchive::load);
CArchive arOut(&SocketFile, CArchive::store);
arOut << szOut;
arIn >> szIn;
I would receive a "501 Not Implemented" errer status in szIn.
Why this happened?
Click Here to Expand Forum to Full Width