So to use the component in asynchronous mode you must only use one

Usually you use a single thread. But as I said before, you may use more threads mainly for two purposes when you write a server application: 1) You have a server application whch has to support hundreds or thousands of simultaneous clients
2) You have to use "lengthy process" such as a long SQL query

When writing a client application you seldom use several threads.

Is there any other benefit in using TDataModule apart from being able to
see the components?

Not much.

I thought TDataModule could receive windows
messages but I was sadly disappointed.

Actually, no object receive any Windows message but all objetcs may manage to do it for you. A TForm is a good example. Adding Windows message handling in a TDataModule is not difficult at all: just allocate a window handle and create a window message procedure to handle all the messages.

A better design is to create a component to encapsulate your processing and handle Windows messages. It is easy to do by reusing TIcsWndControl which encapsulate everything you need for that purpose. Just derive your own component from TIcsWndControl. You have a lot of samples because almost all ICS components are using TIcsWndControl as base class.

The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to