views:

65

answers:

1

I am using Unix domain sockets to do some interprocess communication in Linux. Upon connection, the client sends a struct using send to the server. This struct contains some information about the client including an identifier string at the end. The server receives the info just find and sends another struct back. The client blocks with recv, but never gets anything. The server completes the send call without any errors and moves on.

Is there something fundamental that I am missing here? When I send strings across the socket both sides send and receive just fine. Does the data have to have a terminating NULL? That does not seem right...

A: 

Try flushing the socket on the server.

Steve Emmerson
I don't see anything besides **close** that could flush a socket.
waffleman
Try setting the `flags` argument of the `send()` function to `MSG_EOR`.
Steve Emmerson