I write a simple client/server program in c/linux.
My client will send a short message to to server, then it calls recv(fd,...) immediately to read data from the same socket, but I found the the data is not sent to server, only I quit the client, then data is sent to server, I think it is because the socket is closed then data is sent
But after some search, find there is no way to flush socket , and TCP_NODELAY doesn't have the flush effect.
Is there a way to solve this ,currently I am using tcp socket .