Article View: borland.public.cppbuilder.internet.socket
Article #2041Re: Indy 9 TIdFTP Client - when is a Put() finished?
From: Remy Lebeau (TeamB)
Date: Thu, 24 Aug 2006 23:23
Date: Thu, 24 Aug 2006 23:23
56 lines
3305 bytes
3305 bytes
"Lesley Anne" <mspfila-ng@yahoo.com> wrote in message
news:44ee2f56$1@newsgroups.borland.com...
> You mentioned earlier about Indy not being an event-driven library,
> but it does include some events and I'm still a little confused on when,
> whether, and how to use them.
Most of Indy's events are only for reporting statuses. Most of Indy's
functionality does not depend on using events. There are, of course, some
exceptions to that rule where necessary. But for the most part, Indy is a
very straight-forward, synchronous, serialized library.
> It looks as though the Connect() method should include logging in to the
> server so long as I don't override its default value for AAutoLogin, but
> then there's also the component's OnAfterClientLogin and OnStatus events.
When AAutoLogin is True, Connect() may perform quite a number of operation
internally when setting up the connection with an FTP server. Sending the
username/password is the first step of that process. OnAfterClientLogin is
only used when AAutoLogin is True, to allow the user to do other things in
his/her own code after the username/password are accepted but before the
rest of the connection settings are established. When AAutoLogin is False,
the user has to call Login() manually, and OnAfterClientLogin is not used.
OnStatus is just very generic event for reporting textual messages about the
current state of the underlying socket.
> Do I need to look for the occurance of those event triggers
No.
> can I trust that if Connect() returned without throwing any exceptions
> then I should be ready to send files?
Yes.
> I don't want it to deal with the application's main message queue,
> but with its own message queue.
Secondary threads do not have any message queue by default. If you need a
message queue (which Indy does not), then you have to implement one in your
own code.
> // Connect to host
> try {
> IdFTP->Connect();
> } catch (...) {
Don't use '...' to cahtch VCL exceptions. Catch them by class type
explicitally instead:
} catch (const Exception &) {
Gambit
Technical Details
Message-ID:
<44ee3549$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44ec9e0a@newsgroups.borland.com> <44ecb32d$3@newsgroups.borland.com> <44ecc221$1@newsgroups.borland.com> <44ecd6cd$1@newsgroups.borland.com> <44edc970$1@newsgroups.borland.com> <44edd930$1@newsgroups.borland.com> <44ede279@newsgroups.borland.com> <44ee2f56$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,14159208397bbfa4 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: <44ec9e0a@newsgroups.borland.com> <44ecb32d$3@newsgroups.borland.com> <44ecc221$1@newsgroups.borland.com> <44ecd6cd$1@newsgroups.borland.com> <44edc970$1@newsgroups.borland.com> <44edd930$1@newsgroups.borland.com> <44ede279@newsgroups.borland.com> <44ee2f56$1@newsgroups.borland.com> Subject: Re: Indy 9 TIdFTP Client - when is a Put() finished? Date: Thu, 24 Aug 2006 16:23:47 -0700 Lines: 58 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: <44ee3549$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1156461897 68.69.17.41 (24 Aug 2006 16:24:57 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail