Moved socketpair and fromfd into green/socket and removed from greenio

This commit is contained in:
Ryan Williams
2009-07-24 13:52:16 -07:00
parent 314e60a165
commit 20e6f7e1aa
2 changed files with 5 additions and 13 deletions

View File

@@ -8,10 +8,13 @@ from eventlet.util import wrap_ssl_obj
from eventlet.greenio import GreenSocket as socket
from eventlet.greenio import GreenSSL as _GreenSSL
from eventlet.greenio import GreenSSLObject as _GreenSSLObject
from eventlet.greenio import socketpair, fromfd
def fromfd(*args):
return socket(__socket.fromfd(*args))
return socket(__socket.fromfd(*args))
def socketpair(*args):
one, two = __socket.socketpair(*args)
return socket(one), socket(two)
def gethostbyname(name):
if getattr(get_hub(), 'uses_twisted_reactor', None):

View File

@@ -758,14 +758,3 @@ class GreenSSLObject(object):
for debugging purposes; do not parse the content of this string because its
format can't be parsed unambiguously."""
return str(self.connection.get_peer_certificate().get_issuer())
def socketpair(*args):
one, two = socket.socketpair(*args)
return GreenSocket(one), GreenSocket(two)
def fromfd(*args):
return GreenSocket(socket.fromfd(*args))