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 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. With ICS it uses events to reply to reply codes and non-blocking. But with this you lose - easy to follow code flow. If you really need to make it independent you simply put it in separate thread - both Indy and Synapse have their own way of solving this - Indy has special component for threading sockets and Synapse some kind of function that gets called every once in a while. It is all much better explained here why blocking is better: http://www.ararat.cz/synapse/doku.php/about So I am wondering why ICS prefers events when the code is so much simpler without them? -- 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