shutdown(socket,1) does the same thing.
Do you want to learn programming correctly, or not?
Any IT employer would tell you the same:
Don't use hard-coded integers, when they are defined as macros/enums.
And when they are not (your own code), make them, with meaningful names.
So I just need to add CRLF?? I dunno maybe there is a function on MSDN to generate it. The received header data doesn't have CRLF.
CRLF = Carrier Return, Line Feed,
They are two characters to add to strings returned to client by server.
Basically you do it by
printf( "Text....\r\n" );
\r is CR
\n is LF
\r\n is CRLF
Example HTTP response from HTTP server such as Apache:
After each line there is CRLF f.e. code in C/C++:
send(s,"HTTP/1.1 200 OK\r\n" );
send(s,"Content-Type: text/html\r\n" );
send(s,"\r\n" ); // empty CRLF
No I didn't I read them and https://msdn.microso...3(v=vs.85).aspx trying to figure stuff out and it isn't exactly the same as what I want anyway since it's C++
In MSDN examples, C and C++ are pretty much the same, as they are not using C++ classes nor any C++ specific features.
They could simply call it "Example in C/C++" or "Ëxample in C".