DrPowers
May 30th, 2006, 07:47 AM
I'm having some problems moving my socket to a new thread so it can run independently to the rest of my application.
I'm using AsyncSocket and WinThread.
So far I've
instantiated the socket (with connection)
created the new thread (in suspended mode)
copied the socket to the thread
and started the thread...
As far as I can tell its working fine but I cant seem to figure out how to catch the onReceive calls within the new thread.
When the socket was created within the original (Main Thread) it was created from an overloaded socket class (CMySocket) which I defined the behavior for onReceive calls. But it was saved as a CAsyncSocket within the new thread.
So... how do I define the onReceive behaviors etc.
Thanks in advance.
I'm using AsyncSocket and WinThread.
So far I've
instantiated the socket (with connection)
created the new thread (in suspended mode)
copied the socket to the thread
and started the thread...
As far as I can tell its working fine but I cant seem to figure out how to catch the onReceive calls within the new thread.
When the socket was created within the original (Main Thread) it was created from an overloaded socket class (CMySocket) which I defined the behavior for onReceive calls. But it was saved as a CAsyncSocket within the new thread.
So... how do I define the onReceive behaviors etc.
Thanks in advance.