From owner-freebsd-hackers Mon Aug 17 05:18:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA29893 for freebsd-hackers-outgoing; Mon, 17 Aug 1998 05:18:37 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from omnix.net (omnix.net [194.183.217.130]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA29888 for ; Mon, 17 Aug 1998 05:18:35 -0700 (PDT) (envelope-from didier@omnix.net) Received: from localhost (didier@localhost) by omnix.net (8.8.7/8.8.7) with SMTP id MAA26051 for ; Mon, 17 Aug 1998 12:18:01 GMT (envelope-from didier@omnix.net) Date: Mon, 17 Aug 1998 14:18:01 +0200 (CEST) From: Didier Derny To: hackers@FreeBSD.ORG Subject: Re: Yard/FreeBSD Problem (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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