I too had many problems with CAsyncSock in multithreaded apps, so much so
that I've resorted back to the native SOCKET. What I did is just writing a
simple class to 'wrap around' SOCKET, and write my own functions with the
same names as those member functions of CAsyncSock (so that I don't have to
change the rest of my codes that were earlier written for CAsyncSock). The
only difference now is that I can't do event-based network notifications.
MFC sockets are really cumbersome as it hides away many implementation
details. This is for its event-based network notifications I presume.
I rather not used MFC sockets in any circumstance in the future, just my
personal preference.
At 13:51 12-04-01 -0500, you wrote:
>I am using MSDev 6.0.
>I have a class derived from CAsyncSocket, and a member of that class is an
>SSL*.
>My problem is, if an instance of CAsyncSocket is created in thread A, it is
>not allowed to be used in thread B. My workaround (as suggested MS) is to
>detach the underlying socket in thread A and create a new CAsyncSocket
>instance(CSocket B) in thread B and attach that socket to the new instance.
>
>This is the heart of the problem however. Since the connection has already
>been accepted by both accept and SSL_accept, the SSL* member variable in
>CSocket A is ready for sending and receiving. However since I have to detach
>it along with the socket in CSocket A and attach them both to the new
>CSocket B I can't get the SSL instance to correctly read or write to the
>socket.
>
>Any suggestions? Need more information? Thanks in advance.
>
>Brook A. Keele
>Software Engineer,
>Palisade Systems, Inc.
>2625 North Loop Drive,
>Suite 2120
>Ames, IA 50010
>
>Phone(515)296-5479
>email: [EMAIL PROTECTED]
>
>______________________________________________________________________
>OpenSSL Project http://www.openssl.org
>Development Mailing List [EMAIL PROTECTED]
>Automated List Manager [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]