Fastream Technologies wrote:
>> You say that you post a message to the worker thread to let it
>> What do you do until the worker thread has attached?? You cannot just
>> post a message, you have to wait until the workerthread has allocated the
> What do you suggest? What should I do? Would SendMessage work? But there
> is no SendThreadMessage!
If you have one thread per connection you post your message, then
in a loop check a boolean flag that is set from within the worker thread
when ThreadAttach returned. If you have multiple connections per thread
you could use messages combined with Windows events or other sync-objects.
The latter design is demonstrated with TWSocketThrdServer that I made
to test ICS SSL in a multi-threaded environment. One connection per thread
is demonstrated in demo ThrdSrv.
Arno Garrels [TeamICS]
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be