[lug] socket programming/kernel question

Bear Giles bgiles at coyotesong.com
Wed Mar 5 15:13:37 MST 2003


Michael J. Hammel wrote:
> On Wed, 2003-03-05 at 12:17, Bear Giles wrote:
>>  Information needs to go down the rabbit hole.  Stream protocols 
>>would tell me this, but require me to keep the stream open for the 
>>lifetime of the process even if days pass without use.
> 
> Depends on your runtime environment, but why would keeping these open
> for such a long time be a problem?

If the streams are kept open, the server can't cycle without 
taking out all of the clients.  I'm not expecting to need to cycle 
the server, but if we're talking about something that may be up 
for months it's a real concern.

> TCP can drop packets, but it's pretty minimal.

Unix sockets don't drop packets.  The sender may ignore an error 
code saying that the socket can't take any more data at the 
moment, but once accepted the data isn't lost.

The reason for retrying is that the server may not be ready. 
E.g., if it needs to access a physical smart card it has to prompt 
the user, wait billions of nanoseconds while the meatware works, 
and then finally establish communications.  The meatware may not 
be paying attention, it may be gone for days, it may have lost the 
card or forgotten the passphrase.




More information about the LUG mailing list