On Mon, 12 Jul 2004 16:24:10 +0300, Shachar Shemesh <[EMAIL PROTECTED]>
wrote:
Gilad Ben-Yossef wrote:
Howdie,
Someone (i think it was Shachar) asked about shutdown and loosing
messages - well, I jsut came across the SO_LINGER socket options (man 7
socket) and though it can help:
" SO_LINGER
Sets or gets the SO_LINGER option. The argument is a linger
structure.
struct linger {
int l_onoff; /* linger active */
int l_linger; /* how many seconds to linger for */
};
When enabled, a close(2) or shutdown(2) will not return until
all queued messages for the socket have been successfully sent
or the linger timeout has been reached. Otherwise, the call
returns immediately and the closing is done in the background.
When the socket is closed as part of exit(2), it always lingers
in the background.
"
Cheers,
Gilad
That does not solve my problem, as the whole purpose of the program was
to do things asynchronously. Making shutdown block is not an option.
Thanks anyways, though.
Shachar
Hi all,
Shachar, I've missed the thread where you describe what your problem is and
I can't seem to find it in the Linux-IL archive. I'm actually quite curious
about the problem (as always about network programming).
If it would bother others perhaps you could send me the problem description
privately.
Eli
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]