int shutdown(int socket, int how); how: 0=done receiving, 1=done sending, 2=done sending and receiving
Check recv() return values, errno, etc. to determine if you have been sent a done sending and/or done receiving message.
Or, send a done sending and/or done receiving message yourself. Joe Radoslaw Zielinski wrote:
A comment in spamd.raw states: # Protocol version 1.0 and greater may have "User:" and # "Content-length:" headers. But they're not required. Question: how can Content-Length be optional? AFAIK there is no way (in socket communication) to indicate the end of transmission of not marked, not delimited data -- except for closing the connection, but it's a bit hard to send any response after that.
