socketp.c
/** Make the TCP connection send a RST on hard close.
 */
Make the TCP connection send a RST on hard close.
Make the TCP connection send a RST on hard close .
void reset_socket_on_close(int sd)
{
    struct linger linger ;
    linger.l_onoff = 1 ;
    linger.l_linger = 0 ;
    setsockopt(sd, SOL_SOCKET, SO_LINGER, (char*)&linger, sizeof(linger)) ;
}
void reset_socket_on_close ( int sd ) { struct linger linger ; linger . l_onoff = 1 ; linger . l_linger = 0 ; setsockopt ( sd , SOL_SOCKET , SO_LINGER , ( char * ) & linger , sizeof ( linger ) ) ; }
Make the TCP connection send a RST on hard close.
Make the TCP connection send a RST on hard close .