httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: SO_DONTLINGER
Date Sun, 26 Jan 1997 23:04:17 GMT
AFAIK, what a SO_LINGER with a timer of 0 generally does is drop a
connection violently; ie. send a RST and get rid of it _now_.  The normal
behavior is between that and a SO_LINGER with a timeout.

FreeBSD tcp_usrreeq.c:

struct tcpcb *
tcp_disconnect(tp)
        register struct tcpcb *tp;
{
        struct socket *so = tp->t_inpcb->inp_socket;

        if (tp->t_state < TCPS_ESTABLISHED)
                tp = tcp_close(tp);
        else if ((so->so_options & SO_LINGER) && so->so_linger == 0)
                tp = tcp_drop(tp, 0);
        else {
                soisdisconnecting(so);
                sbflush(&so->so_rcv);
                tp = tcp_usrclosed(tp);
                if (tp)
                        (void) tcp_output(tp);
        }
        return (tp);
}
[...]
/*
 * Drop a TCP connection, reporting
 * the specified error.  If connection is synchronized,
 * then send a RST to peer.
 */
struct tcpcb *
tcp_drop(tp, errno)
[...]

Perhaps.


On Sun, 26 Jan 1997, Jim Jagielski wrote:

> Aha.... seems it simply does a SO_LINGER with a timer of 0, ie:
> disabling SO_LINGER and maintaining the default method.
> 
> Oh well.
> -- 
> ====================================================================
>       Jim Jagielski            |       jaguNET Access Services
>      jim@jaguNET.com           |       http://www.jaguNET.com/
>                   "Not the Craw... the CRAW!"
> 


Mime
View raw message