Add TCP_NODELAY support to client side as well.

This commit is contained in:
Kurt Zeilenga 1999-10-15 18:18:31 +00:00
parent 5abd99a962
commit 4b49884677
2 changed files with 15 additions and 6 deletions

View file

@ -7,7 +7,7 @@ Changes included in OpenLDAP 1.2 Release Engineering
Fixed -lldap templates y2k bug (ITS#294)
Fixed ldbm db_appinit to use u_int32_t instead of int (ITS#295)
Fixed lber/io.c Cray T90 specific pointer arithmetic problem (ITS#325)
Added slapd TCP_NODELAY support
Added TCP_NODELAY support
Documentation
Reference Quick Start Guide in README and INSTALL
ldappasswd(1) fix -c vs -H typo (ITS#154)

View file

@ -49,11 +49,9 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
int connected, use_hp;
struct sockaddr_in sin;
struct hostent *hp = NULL;
#ifdef notyet
#ifdef LDAP_REFERRALS
int status; /* for ioctl call */
#endif /* LDAP_REFERRALS */
#endif /* notyet */
#ifdef TCP_NODELAY
int status;
#endif
Debug( LDAP_DEBUG_TRACE, "ldap_connect_to_host: %s:%d\n",
( host == NULL ) ? "(by address)" : host, (int) ntohs( (short) port ), 0 );
@ -82,6 +80,17 @@ ldap_connect_to_host( Sockbuf *sb, char *host, unsigned long address,
if (( s = socket( AF_INET, SOCK_STREAM, 0 )) < 0 ) {
return( -1 );
}
#ifdef TCP_NODELAY
status = 1;
if( setsockopt( s, IPPROTO_TCP, TCP_NODELAY,
(char *) &status, sizeof(status)) == -1 )
{
Debug( LDAP_DEBUG_ANY, "setsockopt(TCP_NODELAY) failed on %d\n",
s, 0, 0 );
}
#endif
#ifdef notyet
#ifdef LDAP_REFERRALS
status = 1;