Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Aug 1998 14:18:01 +0200 (CEST)
From:      Didier Derny <didier@omnix.net>
To:        hackers@FreeBSD.ORG
Subject:   Re: Yard/FreeBSD Problem (fwd)
Message-ID:  <Pine.BSF.3.96.980817141225.25770A-100000@omnix.net>

next in thread | raw e-mail | index | archive | help

This is the code added by Yard to the client/server to force
TCP_NODELAY in the application. Contrarily to my awful hack in the
kernel we saw no improvement with this modification.

If it is the correct sequence do you have any idea on why it
does not seem to be working ?

If it is not the right sequence what should I do ?
Is setsockop called at the right place ?
Is there anything to do before ?

Thanks for your help.


--
Didier Derny
didier@omnix.net



---------- Forwarded message ----------

This is the code sequence of the client:

===============================
        if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0)
                return(ECONNECT);
        if ((sopt = getenv("YARDTCPNODELAY")))
        {
                int flag = 1;

                setsockopt(s, IPPROTO_TCP, TCP_NODELAY,(char*)&flag,sizeof(int))
;
        }

===============================

and this is the server:

===============================
   
        if ((s = socket(AF_INET,SOCK_STREAM,0)) < 0)
        {
                fprintf(stderr,"server: socket() failed. errno = %d\n",errno);
                netlog("server: socket() failed. errno = %d\n",errno);
                exit(1);
        }

        if ((sopt = getenv("YARDTCPNODELAY")))
        {
                int flag = 1;
        
                printf("Using socket option TCP_NODELAY to %d\n",flag);
                if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY,(char*)&flag,sizeof(i
nt)) < 0)
                {
                        fprintf(stderr,"server: setsockopt() failed. errno = %d\
n",errno);
                        netlog("server: setsockopt() failed. errno = %d\n",errno
);
                }
        }

===============================

Regards

Thomas Schonhoven
-- 

  ///!!     ///!!    //!!        ////////////!!  ///////////!!  
  ///!!     ///!!   ////!!       ///!!     ///!! ///!!    ///!!
  ///!!     ///!!  //////!!      ///!!    ///!!  ///!!     ///!!
   ///!!   ///!!  ///!////!!     ///////////!!   ///!!     ///!!
    ///!! ///!!  ///!! ////!!    //////////!!    ///!!     ///!!
     //////!!   ///!!   ////!!   ///!!  ///!!    ///!!     ///!!
      ////!!   //////////////!!  ///!!   ///!!   ///!!    ///!!
      ////!!  ////!!      ////!! ///!!    ///!!  ///////////!!  

 YARD Software GmbH			YARD Software Ltd.
 Wikingerstr. 18 - 20			Wikingerstr. 18 - 20
 51107 Koeln				51107 Cologne
 Tel.: +4922198664-0
 FAX.: +4922198664-99			E-Mail: support@yard.de
					FTP   : ftp.yard.de
					WWW   : http://www.yard.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980817141225.25770A-100000>