Should I be calling MessageLoop or ProcessMessages?
I now have a working (but horrible) solution:
TService creates a thread to perform the main processing
On the first event this thread creates a TSslWSocket (with
MultiThreaded=false) and calls Connect
At this point I must call *MessageLoop *(not ProcessMessages) to
make the connection
I then send some data
At this point I must call *ProcessMessages *(not MessageLoop) to
send the data
After sending of the data I call WSocket->PostQuitMessage() so
ProcessMessages exits and the thread can complete its event
Thereafter on further events
I then send some data
At this point I must call ProcessMessages (not MessageLoop) to
send the data
After sending of the data I call WSocket->PostQuitMessage() so the
thread can complete its work
Note MessageLoop needed after Connect called, yet ProcessMessages needed
after Send
Works. But surely can't be right??
--
Regards
Paul Read
Partner
Follow us: @nSolve <http://www.twitter.com/nSolve>
*nSolve Ltd*
33-35 Daws Lane
London NW7 4SD
England
www.nsolve.com <http://www.nsolve.com>
Tel: +44 (0) 1993 40 20 11
Tel(US): +1 617 273 2304
On 28/07/2015 19:42, Paul Read - nSolve Ltd wrote:
A MS-Windows service
I'm doing the data send in the main thread of the service (there are
no other threads)
If I don't call the WSocket->PostQuitMesage then the MessageLoop runs
for ever stopping my thread doing anything else. (If I don't call
WSocket->MessageLoop nothing happens at all)
--
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