[PYTHON-CRYPTO] m2crypto - close_wait when running echod_async

Ng Pheng Siong ngps at POST1.COM
Wed Jun 23 11:43:13 CEST 2004


On Wed, Jun 23, 2004 at 10:07:10AM +0200, Andre Reitz wrote:
> Is it possible to use select() on a M2Crypto.SSL.Connection?

ZServerSSL extends the Medusa-based ZServer, Medusa uses select, ZServerSSL
works, so it is possible! ;-)

But currently it is a bit roundabout: asyncore's dispatcher class, upon
which ZServer is based, has this magic method:

        # cheap inheritance, used to pass all other attribute
        # references to the underlying socket object.
        def __getattr__ (self, attr):
                return getattr (self.socket, attr)

SSL.Connection conveniently stores its underlying socket object as the
instance variable "socket", so the above magic method allows Medusa to work
with ZServerSSL's SSL.Connection object without any explicit code to do so.

You may wish to add either the above magic method to class SSL.Connection,
or an explicit "select" method. (I'd do it myself when I find the time,
probably the former.)

Cheers.

--
Ng Pheng Siong <ngps at netmemetic.com>

http://firewall.rulemaker.net     -+- Firewall Version Control
http://sandbox.rulemaker.net/ngps -+- ZServerSSL/Zope Windows Installers




More information about the python-crypto mailing list