I have a CWinThread that when run uses a CSocket object in Listen mode to wait for incoming calls.. after a specific time-out I wish to close
this thread and the socket.. but it keeps blocking, tried everything from
deleteing the socket (Assertion failure) to CancelBlockingCall and Close..
nothing works.. The problem is that the thread is used as a workerthread and has no window.. (this causes a exception on the Close() function..
The timeout of the CSocket object is also non-settable and so it keeps open forever.. The CSocket object is wrapped in a COM object.. but this gives no problems.. it can normally close, open, connect etc.. but when in listen mode
I can't exit the listen mode.. Really driving me nuts..
Am already thinking of changing everything to C++ Builder.. If I knew this would fix the problem..
The CSocket object is in a STREAM modus for synchronus transfer and this needs to be kept.. so please no answers stating to change to async modus.. (Tried that also, but listen keeps blocking and won't close or die..)