def test(self): from gevent.socket import ssl from gevent.socket import socket as gsocket listener = gsocket() listener.bind(('0.0.0.0', 0)) listener.listen(5) listener = ssl(listener) self.assertRaises(TypeError, self.ServerSubClass, listener)
def open(self): resolved = self._resolveAddr() for res in resolved: self.handle = gsocket(res[0], res[1]) try: self.handle.connect(res[4]) except socket.error, e: if res is not resolved[-1]: continue else: raise e break
def open(self): resolved = self._resolveAddr() for res in resolved: self.handle = gsocket(res[0], res[1]) try: self.handle.connect(res[4]) except socket.error, e: if res is not resolved[-1]: continue else: raise e break