M2Crypto: select() behaves weird on SSL sockets

Irmen de Jong irmen at NOSPAMREMOVETHISxs4all.nl
Wed Jun 12 20:20:17 CEST 2002

Ng Pheng Siong wrote:

 > Just wondering: Does your code look contrived structured the way you 
 > IOW, will any (simple) change(s) to M2Crypto's interfaces make it more
 > natural to express what you wish in this case?

Well, I would appreciate a wrapper around select.select, one that
acts on SSL sockets the way I expected (from the man page of select).
That means: a select() wrapper that
1) works on regular files and sockets
2) works on SSL sockets
3) in the case of SSL sockets, honors the pending bytes that might still
    be available after a recv() (or send): don't block but return the
    socket in the 'read' or 'write' list if bytes are pending...

This would greatly simplify my socket reading/writing functions...


More information about the Python-list mailing list