|
Posted privately to Jeremy by mistake,
The Indy threads shouldn't be an issue. eg,
the Server receives data from the client, sends something out of the comport and
sits there doing Application.ProcessMessages until it is ready to send data back
(presumably that it has received from the com port) - all in the same
routine. Even though the routine may be entered more than once before the first
entry exits, as long as you are careful about managing global data, you should
be fine.
I did something a little bit similar to this a
while ago - I had a separate Manager class that held onto the "transactions"
until they had been processed and a return value obtained. The routine that
received the Indy thread basically passed the data to a "slot" in the Manager
class and waited until the Manager class showed that that slot had been
processed and then grabed the result and sent it back to the calling thread. The
Manager class was using a timer to continuously check it's slots and do any work
that it had to.
May be too much work - depends on how much you want
to change your server program.
Cheers,
Phil.
|
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
