3.0.ipv8.messaging.anonymization.pex ==================================== .. py:module:: 3.0.ipv8.messaging.anonymization.pex Attributes ---------- .. autoapisummary:: 3.0.ipv8.messaging.anonymization.pex.PEX_VERSION Classes ------- .. autoapisummary:: 3.0.ipv8.messaging.anonymization.pex.PexSettings 3.0.ipv8.messaging.anonymization.pex.PexCommunity Module Contents --------------- .. py:data:: PEX_VERSION :value: 1 .. py:class:: PexSettings Bases: :py:obj:`3.0.ipv8.community.CommunitySettings` Settings for the PexCommunity. .. py:attribute:: info_hash :type: bytes .. py:class:: PexCommunity(settings: PexSettings) Bases: :py:obj:`3.0.ipv8.community.Community` New on-the-fly overlay for the PEX protocol. .. py:attribute:: community_id .. py:attribute:: _prefix .. py:attribute:: intro_points :type: collections.deque[3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint] .. py:attribute:: intro_points_for :type: list[bytes] :value: [] .. py:method:: get_intro_points() -> list[3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint] Get a list of the most recent introduction points that were discovered using PexCommunity. :return : list of IntroductionPoint objects. .. py:method:: start_announce(seeder_pk: bytes) -> None Start announcing yourself as an introduction point for a certain seeder. :param seeder_pk: public key of the seeder (in binary format). .. py:method:: stop_announce(seeder_pk: bytes) -> None Stop announcing yourself as an introduction point for a certain seeder. :param seeder_pk: public key of the seeder (in binary format). .. py:property:: done :type: bool Check if we have introduction points left. .. py:method:: process_extra_bytes(peer: 3.0.ipv8.peer.Peer, extra_bytes: bytes) -> None Unpack any introduction points piggybacked onto the introduction requests and responses. .. py:method:: introduction_request_callback(peer: 3.0.ipv8.peer.Peer, dist: 3.0.ipv8.messaging.payload_headers.GlobalTimeDistributionPayload, payload: 3.0.ipv8.messaging.payload.IntroductionRequestPayload | 3.0.ipv8.messaging.payload.NewIntroductionRequestPayload) -> None Callback for when an introduction request comes in. .. py:method:: introduction_response_callback(peer: 3.0.ipv8.peer.Peer, dist: 3.0.ipv8.messaging.payload_headers.GlobalTimeDistributionPayload, payload: 3.0.ipv8.messaging.payload.IntroductionResponsePayload | 3.0.ipv8.messaging.payload.NewIntroductionResponsePayload) -> None Callback for when an introduction response comes in. .. py:method:: create_introduction_request(socket_address: 3.0.ipv8.types.Address, extra_bytes: bytes = b'', new_style: bool = False, prefix: bytes | None = None) -> bytes Piggyback introduction points onto introduction requests. .. py:method:: create_introduction_response(lan_socket_address: 3.0.ipv8.types.Address, socket_address: 3.0.ipv8.types.Address, identifier: int, introduction: 3.0.ipv8.peer.Peer | None = None, extra_bytes: bytes = b'', prefix: bytes | None = None, new_style: bool = False) -> bytes Piggyback introduction points onto introduction responses. .. py:method:: send_ping(peer: 3.0.ipv8.peer.Peer) -> None Send a ping messages to a peer. .. py:method:: get_seeder_pks() -> bytes Pack the known seeder public keys (up to 10) as bytes.