(no subject)

李 曉玲 hllee678 at hotmail.com
Mon Apr 21 08:03:08 EDT 2003


Hi,
I have a problem about M2Crypto.
I am using M2Crypto to write the SSL server and client.
My server was based on Medusa.
The client built a SSL connection to server,
and then created a new thread to receive the response from server.

The code of client:
rfile=sock.makefile('rb',-1) #sock is the ssl connection between server and 
client
try: 
    data = rfile.read(100)
    if not data:
        print "no data, maybe try to close connection"   
except:
    print "exception, maybe try to close connection"   

When the server shutdown and close the SSL connection between server and 
client,
the client receiving thread raised a windows exception on rfile.read 
procedure:
Unhandled exception in python.exe (PYTHON21.DLL): 0xC0000005: Access 
Violation

The code of server:
sock.shutdown(2)         # socket is the ssl connection between server and 
client
sock.close() 

Please help me if you know how to solve this problem.
Thank you very much!


_________________________________________________________________
下載最新版本的 MSN Messenger:與朋友在線上聊天,隨時掌握股市財經、工作機會等
最新資訊 http://messenger.msn.com.tw/ 






More information about the Python-list mailing list