FrozenEye
April 1st, 2007, 05:07 PM
char buff[5];
CString htmlSource;
int rb=recv(conn,buff,sizeof(buff),MSG_PEEK);
while(rb>0)
{
rb=recv(conn,buff,sizeof(buff),MSG_PEEK);
htmlSource+=(CString)buff;
}
return htmlSource;
A very usuall recv() !
I use it to get a http request's response from a server
the problem is that i always recieve the response followed by request i sent !!!
which looks like that...
Host: www.site.com
Connection: Close
...ect
ny one got a clue whats wrong ?!
CString htmlSource;
int rb=recv(conn,buff,sizeof(buff),MSG_PEEK);
while(rb>0)
{
rb=recv(conn,buff,sizeof(buff),MSG_PEEK);
htmlSource+=(CString)buff;
}
return htmlSource;
A very usuall recv() !
I use it to get a http request's response from a server
the problem is that i always recieve the response followed by request i sent !!!
which looks like that...
Host: www.site.com
Connection: Close
...ect
ny one got a clue whats wrong ?!