Kacheong Poon wrote:
> On 05/ 7/11 12:35 AM, Nico Williams wrote:
>
>> What would the alternative be? That the socket lingers forever?
>
>
> The current Solaris behavior is that the TCP connection
> continues to do a graceful shutdown. It is like a normal
> close() without setting the linger option. I want to know
> if it is something we can change without breaking backward
> compatibility. If the current behavior is actually the
> wrong behavior, it is just a bug we fix.
I'd be surprised to see TCP RST when l_linger is > 0. That's not how
BSD operates.
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);
}
tcp_drop happens only if l_onoff is 1 and l_linger is 0.
It sounds like the Java documentation is incorrect.
--
James Carlson 42.703N 71.076W <[email protected]>
_______________________________________________
networking-discuss mailing list
[email protected]