CAsynchSocket in the main GUI thread?
I'm writing an application using CAsyncSocket to communicate with a server. When I put my CAsyncSocket object in the main GUI thread (the object is an attribute of the Main Window) everything is going well but if I put it as an attribute of an another object than the UI, it does not work!! I can send data but I cannot receive data, the OnReceive method is never called, I heard it's because of my socket life duration... my socket is destroyed before my data arrives, that's why the OnReceive member function is never called, but I'm sure 100% that my socket is alive (I can see it with the dos cmd line: netstat -a) but the OnReceive method is still not called :-o
Has anyone of you encountered this kinda problem before?
Thanks,

