yep, shutdown() is how it is/was done. Spamd protocol 1.2 uses Content-length; earlier than that did not. while the spamd/PROTOCOL file is unclear, not mentioning it either way, you can (a) assume that it's mandatory in >= 1.2 (since all our clients use that behaviour afaik) and (b) fix the doco to reflect that, if you like. ;)
--j. Joe Flowers writes: > 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. > > > >
