Article View: borland.public.cppbuilder.internet.socket
Article #492Re: Indy10 usage
From: Remy Lebeau (TeamB)
Date: Wed, 05 Mar 2008 05:38
Date: Wed, 05 Mar 2008 05:38
48 lines
2727 bytes
2727 bytes
"Mike Ruskai" <BUTthannydI@DONTearthlinkLIKE.netSPAM> wrote in message
news:tu0ss39uaq8j35if50r88eflpsf5nvs431@4ax.com...
> Which means you have to pick an arbitrary length of time you're
> willing to have the program sit doing nothing, because there's no
> function to read UP TO a number of bytes, from whatever's available,
> without blocking until that number of bytes is completely filled.
Yes, there is a way, which I mentioned in my previous reply, and below.
> As it happens, ReadFromSource() is *not* publically accessible.
> It's protected.
Sorry, I meant CheckForDataOnSource() instead:
IOHandler->CheckForDataOnSource(10);
IOHandler->ReadBytes(buffer, min(1024, IOHandler->InputBuffer->Size));
> One of the big problems here is documentation. All I have to go by
> is the Indy 10.1.1 docs in BCB2007, since there's no hint of
> documentation on the Indy home page.
Then you didn't look very closely:
http://www.indyproject.org
Indy.Sockets (VCL) > Documentation
> From those docs, I can see that CheckForDataOnSource() calls
> ReadFromSource() internally, so is a suitable replacement for your
> suggestion.
Yes.
> It seems to work as intended, provide I use a Readable() call before hand
> as an equivalent to select().
You don't need to call Readable() or select() beforehand. ReadFromSource()
calls select() internally, using the timeout that you pass in.
> Well, yes. Aside from the fact that none of the commands match those
> of FTP, the command response format is different, the data transferred
> is not the contents of a file.
TIdFTP is not limited to files only. Any TStream can be used.
Gambit
Technical Details
Message-ID:
<47ce31f2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<ghsqs35tipni65rjlntjpl7hgi6f1bv1g8@4ax.com> <47cd89bb$1@newsgroups.borland.com> <tefrs3lpnfkk0arr2qa3vospikaj3j491h@4ax.com> <47cdc920@newsgroups.borland.com> <tu0ss39uaq8j35if50r88eflpsf5nvs431@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ea086d952e8cb041 X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <ghsqs35tipni65rjlntjpl7hgi6f1bv1g8@4ax.com> <47cd89bb$1@newsgroups.borland.com> <tefrs3lpnfkk0arr2qa3vospikaj3j491h@4ax.com> <47cdc920@newsgroups.borland.com> <tu0ss39uaq8j35if50r88eflpsf5nvs431@4ax.com> Subject: Re: Indy10 usage Date: Tue, 4 Mar 2008 21:38:47 -0800 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 75.83.29.61 Message-ID: <47ce31f2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204695538 75.83.29.61 (4 Mar 2008 21:38:58 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail