Flushing a socket id

Flushing a socket id

Post by Shane McDanie » Thu, 25 Oct 2001 22:50:26

Using the c++ calls of socket() and connect() I get a socket ID.   However
it appears that if I don't end my message in a '\n' the message is not
completely sent.

ie if my message is

std::string message = "Part 1\nPart 2";

and I send message.c_str()  then the text "Part 1\n" is send across the
socket, but "Part 2" is not.  However a socket close will cause it to be

My question is, how can I flush a socket id, preferably without haveing to
link it to a FILE *.

Thank You.