gabriel rosenkoetter on Wed, 19 Jun 2002 11:05:11 +0200 |
On Tue, Jun 18, 2002 at 07:21:31PM -0500, Sean Finney wrote: > so i'm experimenting with kernel-level sockets, and i have a working > daemon that listens on a given tcp/ip port and writes "hello" to anyone > that connects. the problem is, that I'm getting an increasing number > of lingering connections in the CLOSE_WAIT state after the client > disconnects. > > normally, i remember doing something with setsockopt and SO_LINGER to > get rid of that back in the good ol' days of userland, but I either > can't remember how I did that, or that functionality doesn't exist > in kernel sockets. You're on the right track with setsockopt(2), but I thought it was one of the SO_REUSE* flags. In any case, I think code you have (Kuzman's--you haven't blown that away have you? I think the CVS repository's still on uriel) does this. And if it doesn't, I've got stuff left over from my cs97 in-class assignments that does on a system you've got root access to. (It's okay, I give you permission.) The robot people also do this all over the place. (Nathaniel was so happy when he figured it out...) Do summarize here, though, since most of that was completely unintelligible to the general audience. ;^> -- gabriel rosenkoetter gr@eclipsed.net Attachment:
pgp5PEjolbiSL.pgp
|
|