I solved the problem now (at least mostly) by creating a thread and
assigning the socket to this thread. The execute of the thread is mostly
a message loop.
The normal case now behaves as it should, but if I try to handle a
"emergency" exit command (means not the normal way to quit but some
allowed one in case something goes wrong), the thread's execute runs
until its end but the OnTerminate handler I assigned is never called and
FastMM also reports a memory leak (my thread class). Grr! But since it's
in the shutdown situation it's not that important right now. I also
posted on the cg.delphi.vcl.using group about my new problem.
To have your thread terminate faster, you should post a WM_QUIT message to
the thread (or the window you created there). This will break the message
loop and let the thread terminate.
So case mostly solved.
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 http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be