Article View: borland.public.cppbuilder.internet.socket
Article #422Re: Using TIdTCPServer
From: Bob Gonder
Date: Fri, 01 Feb 2008 21:36
Date: Fri, 01 Feb 2008 21:36
23 lines
2341 bytes
2341 bytes
Peter wrote: >See... this is what I do not understand (excuse my ignorance here). >Shouldn't OnExecute be invoked only once per client connection? This is my take on Remy's explanation: What if the client wants to ask for 5 things? >1. A clinet connects. >2. The listener thread spawns a new thred and executes OnExecute handler in it. 3. OnExecute determines what the Client wants and serves it. 4. On Execute exits. 5. Server restarts OnExecute. Goto 3, 5 more times. 6. Client is satisfied and disconnects. 7. OnExecute's Read() aborts, and OnExecute exits for last time. 8. Thread terminates. >If I'm coming into the OnExecute for the second time with the same connection, > how would I know where in the data I am? Hopefully you satisfied one complete transaction before leaving OnExecute. Entering OnExecute should happen in the hopes/context of a new transaction.
Technical Details
Message-ID:
<hc37q31ckcofgfv76vqf4ac89fkrlomac3@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4798cf30$1@newsgroups.borland.com> <4798db8f$1@newsgroups.borland.com> <4798ef34$2@newsgroups.borland.com> <479e2c75$1@newsgroups.borland.com> <479e382e$1@newsgroups.borland.com> <479f4835$1@newsgroups.borland.com> <479f51f8$1@newsgroups.borland.com> <479f68b1$1@newsgroups.borland.com> <479f7070$1@newsgroups.borland.com> <479f9ae1$1@newsgroups.borland.com> <47a2265f$1@newsgroups.borland.com> <47a24592@newsgroups.borland.com> <47a369a7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,452e664b18b0b56c X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Using TIdTCPServer Date: Fri, 01 Feb 2008 13:36:26 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <hc37q31ckcofgfv76vqf4ac89fkrlomac3@4ax.com> References: <4798cf30$1@newsgroups.borland.com> <4798db8f$1@newsgroups.borland.com> <4798ef34$2@newsgroups.borland.com> <479e2c75$1@newsgroups.borland.com> <479e382e$1@newsgroups.borland.com> <479f4835$1@newsgroups.borland.com> <479f51f8$1@newsgroups.borland.com> <479f68b1$1@newsgroups.borland.com> <479f7070$1@newsgroups.borland.com> <479f9ae1$1@newsgroups.borland.com> <47a2265f$1@newsgroups.borland.com> <47a24592@newsgroups.borland.com> <47a369a7$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.146.141 X-Trace: newsgroups.borland.com 1201901784 67.77.146.141 (1 Feb 2008 13:36:24 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail