> This is often problem during slow server respons.
> 
> Assuming POP3 service with preset relatively small timeout (1-5 sec).
> After connection and sending any command, data will be read from
> socket correctly until server delays exceed preset timeout value. That
> is unfortunate, since undelivered (delayed) data will be delivered
> later and available in the socket buffer before next command is sent.
> On next command, first will be received these previously undelivered
> data!
> 
> That is unfortunate, since LIST may return result of STAT, or any
> other previous command. It would be practical to clean socket buffer
> before command is sent. Also having minimum timeout value limit by
> application (at least e.g 10 sec) will decrease possibility of arising
> mentioned problem, however it will not solve it entirely, since we
> cannot estimate when server will actually respond on sent command.

we are not reading data until timeout. You just doing it you your 
code, but synapse not doing it in Pop3send. So, original Synapse code 
not have any from your presented problems. Pop3send is fast and 
reliable. You just found reasons, why I say before to you: "reading 
until timeout is very bad idea" and "we really need two reading 
functuions - one for one-line responses and onde for multiline 
responses."

Any reading will not to be based on timeout. Timeout is just policy 
against broken connection.


-- 
Lukas Gebauer.

E-mail: [EMAIL PROTECTED]
http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.


-------------------------------------------------------------------------
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

Reply via email to