httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@wired.com>
Subject setsockopt & keepalives
Date Sun, 12 Mar 1995 02:18:55 GMT

SGI had suggested we insert this into httpd.c next to the other setsockopt
calls, carte blanche - any comments?  Is this a pretty non-portable patch? 

int keepalive_value = 1;  
if((setsockopt(sd,SOL_SOCKET,SO_KEEPALIVE,(const void *)&keepalive_value,
  sizeof(keepalive_value))) == -1) {
    fprintf(stderr,"httpd: could not set socket option\n"); 
    perror("setsockopt"); 
    exit(1); 
}


        Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hotwired.com  brian@hyperreal.com  http://www.hotwired.com/Staff/brian/


Mime
View raw message