Zvone wrote:
> When I looked at Indy and Ararat Synapse they both prefer blocking
> sockets to connect to text-based protocols like HTTP, POP, SMTP, FTP
> etc. 

The main advantage of non-blocking is that you do not need one thread
per connection. Writing multi-threaded applications is not easy and
debugging can become quite difficult. One thread per connection is
waste of resources IMO. With ICS it's possible to handle hundreds of
connections within a single thread. The main disadvantage of using async.
winsock API is platform-dependence. Though Francois already found a way 
to emulate messages on Linux (Kylix). 

> 
> The reason - because communication is flowed - you send command, you
> wait reply, if reply does not match you handle error. It is all nice
> line-by-line inline code.

You can use the SyncXxx methods available in the HTTP, FTP, SMTP and POP3
client components if you prefer traditional coding.


-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to