My Dear:       
        I have wrote a sslServer and sslClient class.
        In  the server's main program, create a listenning socket, when an accept socket is setup, then fork a process, then new a sslServer object and pass the socket fd to the sslServer object, then  process client's request and answer, before the child exit, delete sslServer object.
        On the client side, first setup a socket connection with the server, then fork a child, in the child process, new a sslClient object with parent's socket fd, then do request and recieve msg.  Before the child exit, delete sslClient object.
But a problem come on:
       After few days, on the server side, there are many ssl socket connection did not exit clean, they are mostly in close_wait state and few in established state. Then, when a client attempt to connect to the server with sslClient object, they failed, and  the sslServer failed at SSL_accept with no error msg. After I restart the server program, everything is ok. How I can solve this headache problem!
Attachment is my sslServer, sslClient and sslBase class, Is something wrong with them? By the way, It is not me who wrote the server and client programs, I just wrote sslServer, sslClient, sslBase and a program to produce cert and privite key file for the server and client. But I have wrote some simple test program to test my ssl classes, there is no such error phenomenon I discribed up.
        So headache, Anyone can help me? Thx very much! 
                                                                                                                            zhou guanghua
 
__________________________________________________________________
Guanghua Zhou
No
ICQ#: 163768997
Current ICQ status:  
( Home Tel#:  No
( Work Tel#:  No
7 Fax#:  No
+  More ways to contact me
__________________________________________________________________

Attachment: online?icq=163768997&img=21
Description: Binary data

Attachment: sslClass.zip
Description: Binary data

Reply via email to