latest.ipv8.test.mocking.exit_socket

Module Contents

Classes

MockTunnelExitSocket

Mocked TunnelExitsocket that uses a mock endpoint.

class latest.ipv8.test.mocking.exit_socket.MockTunnelExitSocket(parent: latest.ipv8.messaging.anonymization.exit_socket.TunnelExitSocket)

Bases: latest.ipv8.messaging.anonymization.exit_socket.TunnelExitSocket, latest.ipv8.messaging.interfaces.endpoint.EndpointListener

Mocked TunnelExitsocket that uses a mock endpoint.

enable() None

Set this exit node to enabled.

sendto(data: bytes, destination: latest.ipv8.types.Address) None

Send data through to another mock endpoint’s address.

on_packet(packet: tuple[latest.ipv8.types.Address, bytes]) None

Callback for when data is received.

async close() None

Close our fake exit socket.