Subject: Re: Dumb/silly network programming question
To: #List NetBSD current users <current-users@NetBSD.ORG>
From: Paul Goyette <>
List: current-users
Date: 12/06/2003 09:15:59
On Sat, 6 Dec 2003, Christian Biere wrote:

> Well, if you would just quit telnet (or whatever) normally instead of
> using SIGKILL the socket should be close()d automatically and the
> server would see that the connection was closed.

The client isn't always under my control.  :(

I've basically given up, and decided to send IAC NOP whenever the
ready-to-read socket returns no data.  The send() gets the local
(server) end of the connection out of CLOSE_WAIT and normal TCP
recovery takes over from there.

|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:   |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 |   |
|  & World Cruiser | 0786 F758 55DE 53BA 7731 | |