Article View: borland.public.cppbuilder.internet.socket
Article #2808Re: TidTCPConnection read data delay
From: supaul
Date: Wed, 18 Jan 2006 03:57
Date: Wed, 18 Jan 2006 03:57
34 lines
2170 bytes
2170 bytes
Thanks, it is correct! "Bob Gonder" <notbg@notmindspring.invalid> ??????:ap9qs1pu7b6mf7cn9v9gejknfau59l1nmv@4ax.com... > supaul wrote: > > >while my server app and client app run in the same computer, the line in > >codes mark with red will run normal, and speed is fast. But while server app > >and client app run in two computers, client app will delay(the line mark > >with red in codes), please tell me how to solve this problem? > > (There are no colors in the newsgroup, better to mark the lines with > comments) > > See my message from 5/4/2005 > 50th71db9qmpnog2gldkeqvsfv112h3ano@4ax.com > > Subject: Re: sendto to same destination more times after eachother > fails.? > > > TCP buffers data so the data-to-packetheader ratio is sane. When > sending a single integer, the packet is several times the size of the > data, quite wastefull, so by default, TCP holds onto the data for a > period of time, hoping more data will be sent. > If you don't want to wait for the timeout, you need to tell TCP not to > wait. > > Look into this WinSock API command, and parameters.. > > setsockopt(ClientOutSocket,IPPROTO_TCP,TCP_NODELAY,(char*)&t,sizeof(t)); > > >
Technical Details
Message-ID:
<43cdbd00$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!195.140.150.52.MISMATCH!ndsoftware.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<43cc863b@newsgroups.borland.com> <ap9qs1pu7b6mf7cn9v9gejknfau59l1nmv@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,5b327d79ad23504f X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "supaul" <qzwusir@163.com> From: "supaul" <qzwusir@163.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <43cc863b@newsgroups.borland.com> <ap9qs1pu7b6mf7cn9v9gejknfau59l1nmv@4ax.com> Subject: Re: TidTCPConnection read data delay Date: Wed, 18 Jan 2006 11:57:14 +0800 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 218.85.87.72 Message-ID: <43cdbd00$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137556736 218.85.87.72 (17 Jan 2006 19:58:56 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!proxad.net!195.140.150.52.MISMATCH!ndsoftware.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail