Search All Forums
Dart Home | PowerTCP Winsock for ActiveX | Custom Development Reply | PowerTCP Winsock for ActiveX Topics | Forums   
AuthorForum: PowerTCP Winsock for ActiveX
Topic: receiving events on a multi threaded app

From: Lenexa, KS USA
Posts: 1
Member Since: 04/24/09
posted April 27, 2009 10:42 AM

Hello ,

i am using Dart TCP component with Borland C++ builder.

when the tcp socket is on the main thread, the socket would stop receiving events, if the main thread is blocked and not processing windows messages.

If i put the TCP component on a class that derives from TThread, and the main thread is blocked, the socket would still not get the receive event

Only way i can make it work if i keep polling the receive buffer for more data, but this seems highly inefficient.

is there a demo app that i can see, or some documentation available on how to receive events on a separate thread ?

many thanks
K M Drake

From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted April 30, 2009 12:08 PM

It sounds like the thread lacks a message pump to process the event messages.

The preferred technique would be to use blocking Receive calls on the worker thread.

Hope it helps,

-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.

Reply | PowerTCP Winsock for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX