Article View: borland.public.cppbuilder.internet.socket
Article #3084Re: TServerSocket Not Receiving Data
From: Remy Lebeau (TeamB)
Date: Wed, 16 Nov 2005 21:58
Date: Wed, 16 Nov 2005 21:58
38 lines
2420 bytes
2420 bytes
"Bill Cain" <bill.ctr.cain@faa.gov> wrote in message news:437a3b0b$1@newsgroups.borland.com... > I am not using the TServerSocket's OnGetThread event > to provide my own custom thread object. When using a TServerSocket in blocking mode, it is not strictly a requirement to do so, but it does make the coding of the connection much easier if you do provide your own thread. > OnClientRead won't trigger if I don't use OnGetThread Yes, it will. > In my case the OnClientRead is not being triggered. Should it be? Yes, it should be. Do note, however, that the default thread does use TThread::Synchronize() to trigger the OnClientRead/Write events. So if your main thread is blocked, the events will also be blocked. > How can I determine if the data transfer is complete? The data connection will be closed. That is how the streaming mode of the FTP protocol is designed to work. > It is my understanding that since my FTP client is executing > in a thread other than the main VCL thread, that I must use > stThreadBlocking mode since the thread does not have a > message loop/service to trigger serial async events. Is that > correct? A message queue is required for non-blocking sockets, yes. If no message queue is available then blocking mode must be used. Otherwise, add your own message queue in the thread so that non-blocking sockets can be used. Gambit
Technical Details
Message-ID:
<437bab35$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4378d734$1@newsgroups.borland.com> <43790e73$1@newsgroups.borland.com> <43792aca$1@newsgroups.borland.com> <437a3b0b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ed98f643ba2c61e4 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4378d734$1@newsgroups.borland.com> <43790e73$1@newsgroups.borland.com> <43792aca$1@newsgroups.borland.com> <437a3b0b$1@newsgroups.borland.com> Subject: Re: TServerSocket Not Receiving Data Date: Wed, 16 Nov 2005 13:58:11 -0800 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <437bab35$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1132178229 68.69.17.41 (16 Nov 2005 13:57:09 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail