[fpc-pascal] Synapse TTCPBlockSocket Send and Receive issue
Krzysztof
dibo20 at wp.pl
Sat Oct 18 13:13:31 CEST 2014
Hi,
I need to use TTCPBlockSocket on client side. I need to listen for
server messages so I moved TTCPBlockSocket.RecvString(100) to another
thread loop. The problem is that I also need same socket to send
messages from main thread. I suppose that I need to use critical
sections to avoid deadlocks. I'm worrying about efficient because
TTCPBlockSocket.RecvString(100) routine need to be also between
critical section access (100 milliseconds sleep). Is exists any other
way to do this? Maybe better use TApplication.OnIdle event and call
RecvString there? I know that LNet are non-blocking but I must use
Synapse.
Regards
More information about the fpc-pascal
mailing list