Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

34 lignes
795B

  1. __socket = __import__('socket')
  2. __all__ = __socket.__all__
  3. __patched__ = ['fromfd', 'socketpair', 'ssl', 'socket', 'timeout']
  4. import eventlet.patcher
  5. eventlet.patcher.slurp_properties(__socket, globals(), ignore=__patched__, srckeys=dir(__socket))
  6. os = __import__('os')
  7. import sys
  8. from eventlet import greenio
  9. socket = greenio.GreenSocket
  10. _GLOBAL_DEFAULT_TIMEOUT = greenio._GLOBAL_DEFAULT_TIMEOUT
  11. timeout = greenio.socket_timeout
  12. try:
  13. __original_fromfd__ = __socket.fromfd
  14. def fromfd(*args):
  15. return socket(__original_fromfd__(*args))
  16. except AttributeError:
  17. pass
  18. try:
  19. __original_socketpair__ = __socket.socketpair
  20. def socketpair(*args):
  21. one, two = __original_socketpair__(*args)
  22. return socket(one), socket(two)
  23. except AttributeError:
  24. pass