Talking to a server in Win32; how do I see the server's response?

Posted by Vinod K on Stack Overflow See other posts from Stack Overflow or by Vinod K
Published on 2011-01-16T03:33:30Z Indexed on 2011/01/16 3:53 UTC
Read the original article Hit count: 187

Filed under:
|
|

I am new to Win32 programming.

sprintf(lpszBuff,"HELO Mail-Server\r\n");
     send(s,lpszBuff,strlen(lpszBuff),0);     
     recv(s,lpszBuff,100,0);
  cout << lpszBuff;

In here I connect to a local mail server. The buffer contains the request I send, the same buffer contains the reply send by the browser. How do I see the reply? cout <<buffer doesn't show any output. I am doing this on VC++ 2008.

© Stack Overflow or respective owner

Related posts about winapi

Related posts about smtp