tribler.core.session

Attributes

logger

Classes

IPv8Endpoint

An DispatcherEndpoint that allows its preferred interface to be updated.

Session

A session manager that manages all components.

Functions

_is_url_available(→ tuple[bool, bytes | None])

rescue_keys(→ None)

Check and rescue private keys if necessary.

Module Contents

tribler.core.session.logger
async tribler.core.session._is_url_available(url: str, timeout: int = 1) tuple[bool, bytes | None]
tribler.core.session.rescue_keys(config: tribler.tribler_config.TriblerConfigManager) None

Check and rescue private keys if necessary.

class tribler.core.session.IPv8Endpoint

Bases: ipv8.messaging.interfaces.dispatcher.endpoint.DispatcherEndpoint

An DispatcherEndpoint that allows its preferred interface to be updated.

update_preferred_interface() None

Update the preferred interface.

class tribler.core.session.Session(config: tribler.tribler_config.TriblerConfigManager)

A session manager that manages all components.

config
shutdown_event
restart_requested = False
notifier
download_manager
rust_endpoint: ipv8_rust_tunnels.Endpoint | None = None
ipv8
loader
rest_manager
mds: tribler.core.database.store.MetadataStore | None = None
torrent_checker: tribler.core.torrent_checker.torrent_checker.TorrentChecker | None = None
register_launchers() None

Register all IPv8 launchers that allow communities to be loaded.

register_rest_endpoints() None

Register all core REST endpoints without initializing them.

_except_hook(typ: type[BaseException], value: BaseException, traceback: types.TracebackType | None) None

Handle an uncaught exception.

Note: at this point the REST interface is available. Note2: ignored BaseExceptions are BaseExceptionGroup, GeneratorExit, KeyboardInterrupt and SystemExit

_asyncio_except_hook(loop: asyncio.AbstractEventLoop, context: dict[str, Any]) None

Handle an uncaught asyncio exception.

Note: at this point the REST interface is available. Note2: ignored BaseExceptions are BaseExceptionGroup, GeneratorExit, KeyboardInterrupt and SystemExit

attach_exception_handler() None

Hook ourselves in as the general exception handler.

async start() None

Initialize and launch all components and REST endpoints.

async find_api_server() tuple[str | None, bytes | None]

Find the API server, if available.

async shutdown() None

Shut down all connections and components.