> You must not tocreate descendant in all cases. If you want to handle
True, however it is always possible to do something like:
function POP3SendCommad(POP3:TPOP3Send; const value: string): boolean;
Similar I used to simulate unsupported TOP n for Indy 9. However, it is always
better to have basic support inside the library itself.
> non-standard POP3 commands, what about to create two new methods:
> function CustomCommad(const value: string): boolean;
> function CustomCommadLong(const value: string): boolean;
> Cover this your needings?
In general yes.
In fact, in my own opinion, no need to separate commands which receiving one
or more lines. I seen from Synapse code, that creating SendCommand method is
a problem because synapse parse received lines at once while receive it from
buffer. I'm aware this way you save some time parsing first and last line at
once instead in each command method. I suppose that is the reason you
separated one and multi line receiving.
I perconally receive it without parsing first. After receiving raw lines
performing parse in each command methods. That require at least one
additional call of a parse function. There will be no significant performance
dropping and second it will be also no need for separating one and multiline
response. Parse function will basically filter '+OK', '-ERR' at first and '.'
on end of FFullResult.
> Who need to got range 0 - 0? ;-O All other combinations are covered
> fine with fixed code.
All possible sized need to be covered during creating safe application.
With current solution, we will have similar code in application:
// Get URLFileSize from header
// inf no error proceed with getting data
if URLFileSize=0 then
// no need to get data
else
If URLFileSize=1 then
begin
HTTP.StartRange=0;
HTTP.EndRange=0;
// Composed header without range
HTTP.Method('GET')
end else
begin
HTTP.StartRange=startrangevar;
HTTP.EndRange=endrangevar;
// Composed header with range
HTTP.Method('GET')
end;
...
Whit default -1:
if URLFileSize>0 then
begn
HTTP.StartRange=startrangevar;
HTTP.EndRange=endrangevar;
// Compopese header
HTTP.Method('GET')
end;
...
Much less additional supported code.
> What about handle this situation like it is handled by IE or Firefox?
> These webbrowsers not doing download directly to final file, but into
> temporary files instead. When download is successfull, then made
> final file from correctly downloaded pieces in temporaty files.
Problem with this is that is not possible to resume broken downloading and as
well it is not visible temporarely downloaded file which is useful if
received part need to be resumed later. We need to cover getting small and
large files throug HTTP. But yes, you never downloading it in e.g.
somepackage.deb directly, but in in somepackage.deb.part or similar to signal
succesfulness of download. That method I use for mentioned Download
Accelerator.
Direct appending in the real file is useful for streaming TV/Radio signal
through broadband.
> Yes, and I not habve any problem with this. You can made and publish
> any derived work from Synapse sources, just leave untouched my
> copyright and license information on begin of my sources. If you want
> to modify my sources, just add your name and copyright to
> 'contributions' section on begin of file.
Yes, you wrote that as well in the reply, thank you one more. However, that is
not the case here - it means that I do not force these solutions and
suggestion in any way. I simply wrote approach I use (and elaborate if you
ask), which are suitable for my own needs, which may or not to be of interest
for synapse. That is of course always on you to decide.
Sasa
--
www.szutils.net
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public