🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1864

Re: Slow ACK'ing

#1864
From: Lesley Anne
Date: Fri, 13 Oct 2006 14:20
22 lines
2173 bytes
Bob Gonder wrote:
>
> I think, if you followed Lesley's code, it would be wrong.
> I think you need to Open() first, so you have a valid socket
> to set the option on.

You're right.  The code I had we had originally copied from some message 
here, and used as-is, thinking it worked, but I wasn't checking the actual 
return value.  My boss and I just did a test and we are getting back a -1 
return with an error of 10038 (WSAENOTSOCK).  It looks like I've got a few 
changes to make.

Well, at least it's an easy change.  The call to setsockopt() was set up 
correctly.  It was just in the wrong position.  It should be right after the 
call to Open() rather than right before it.  This way it works:


   BOOL enabled = TRUE;

   ClientSocket1->Open();
   setsockopt((SOCKET)ClientSocket1->Socket->SocketHandle, IPPROTO_TCP,
                     TCP_NODELAY, (char*)&enabled, sizeof(BOOL));
Technical Details
Message-ID: <452fa0af$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!feeder.news-service.com!news.germany.com!news.mb-net.net!news.taunusstein.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <452cea31$1@newsgroups.borland.com> <0hvpi29knbm09uif8ncifnmcuihfr6ttsa@4ax.com> <452d24b3$1@newsgroups.borland.com> <92mqi2ho9q2ighfk0aegstmoshu4n7rpv6@4ax.com> <452d5df9@newsgroups.borland.com> <452d726d$1@newsgroups.borland.com> <dccri2p4toj3hvqk03791cccrsvqdo2s38@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,74648bce769a50c7
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Lesley Anne" <mspfila-ng@yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <452cea31$1@newsgroups.borland.com> <0hvpi29knbm09uif8ncifnmcuihfr6ttsa@4ax.com> <452d24b3$1@newsgroups.borland.com> <92mqi2ho9q2ighfk0aegstmoshu4n7rpv6@4ax.com> <452d5df9@newsgroups.borland.com> <452d726d$1@newsgroups.borland.com> <dccri2p4toj3hvqk03791cccrsvqdo2s38@4ax.com>
Subject: Re: Slow ACK'ing
Date: Fri, 13 Oct 2006 10:20:31 -0400
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 144.160.5.25
Message-ID: <452fa0af$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1160749231 144.160.5.25 (13 Oct 2006 07:20:31 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!feeder.news-service.com!news.germany.com!news.mb-net.net!news.taunusstein.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail