Article View: borland.public.cppbuilder.internet.socket
Article #2802TidTCPConnection read data delay
From: supaul
Date: Tue, 17 Jan 2006 05:51
Date: Tue, 17 Jan 2006 05:51
34 lines
1914 bytes
1914 bytes
I build a client/server program, use TIdTCPServer in Server and use TIdTCPClient in Client, as fllowing: -------------------------------------------------- Server: in on execute event, i write some codes TIdTCPServer.OnExecute(AThread: ...) var I: Integer; begin I:= AThread.Connection.ReadInteger; I:= 10; AThread.Connection.WriteInteger(I); I:= 20; AThread.Connection.WriteInteger(I); end; Client: in a button's click event OnButtonClick(Sender: TObject) var I: Integer; begin I:= 10; TCPClient.WriteInteger(I); I:= TCPClient.ReadInteger; //the following line has some error I:= TCPClient.ReadInteger; end; ------------------------------------------------------------- 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?
Technical Details
Message-ID:
<43cc863b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!pln-w!lotsanews.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,5b327d79ad23504f,start 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 Subject: TidTCPConnection read data delay Date: Tue, 17 Jan 2006 13:51:17 +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: <43cc863b@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1137477179 218.85.87.72 (16 Jan 2006 21:52:59 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!newshub.sdsu.edu!pln-w!lotsanews.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail