TClientSocket
in non-blocking mode uses a hidden window internally to receive socket events. If you use a non-blocking TClientSocket
in a TThread
then you must implement a message loop inside of your TThread::Execute()
method in order to dispatch those messages to the socket's window. Also, being window-based, that also means that the socket messages are sent to the thread that actually creates the socket window, so you have to make sure you are opening the TClientSocket
from inside of your TThread::Execute()
method.
BTW, BCB6 shipped with Indy 8, which is an alternative. You can also install an up-to-date version of Indy, or even another third-party library like ICS or Synapse.