M2Crypto: select() behaves weird on SSL sockets

Kragen Sitaker kragen at pobox.com
Thu Jun 13 23:21:06 CEST 2002

Irmen de Jong <irmen at NOSPAMREMOVETHISxs4all.nl> writes:
> Ng Pheng Siong wrote:
> 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...

Irmen, why aren't you using asyncore?

For those of us who use asyncore, an asyncore.dispatcher-compatible
wrapper around an M2Crypto socket that you could hand to asyncore and
hang handlers on would probably be sufficient.

More information about the Python-list mailing list