Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

address.py 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- test-case-name: twisted.conch.test.test_address -*-
  2. # Copyright (c) Twisted Matrix Laboratories.
  3. # See LICENSE for details.
  4. """
  5. Address object for SSH network connections.
  6. Maintainer: Paul Swartz
  7. @since: 12.1
  8. """
  9. from zope.interface import implementer
  10. from twisted.internet.interfaces import IAddress
  11. from twisted.python import util
  12. @implementer(IAddress)
  13. class SSHTransportAddress(util.FancyEqMixin):
  14. """
  15. Object representing an SSH Transport endpoint.
  16. This is used to ensure that any code inspecting this address and
  17. attempting to construct a similar connection based upon it is not
  18. mislead into creating a transport which is not similar to the one it is
  19. indicating.
  20. @ivar address: An instance of an object which implements I{IAddress} to
  21. which this transport address is connected.
  22. """
  23. compareAttributes = ("address",)
  24. def __init__(self, address):
  25. self.address = address
  26. def __repr__(self) -> str:
  27. return f"SSHTransportAddress({self.address!r})"
  28. def __hash__(self):
  29. return hash(("SSH", self.address))