Пример #1
0
 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)
Пример #2
0
 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
Пример #3
0
 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