Skip to main content

PoSessionHandle

A handle to a session.

Properties​

id: number​

v0.51.0

Returns the ID of this session.

name: string​

v0.42.0

Returns the name of this session.

Methods​

add_dht_node(host: string, port: number): void​

v0.42.0

Adds a node to the DHT routing table.

apply_settings(settings: LtSettingsPack): void​

v0.42.0

Raises an error if a value is out of range; nothing is applied.

Applies settings to this session. Some settings cannot be set, like user agent or peer fingerprint.

get_settings(): LtSettingsPack​

v0.42.0

Gets all the settings for this session.

is_paused(): boolean​

v0.42.0

Returns a value indicating whether this session is paused.

pause(): void​

v0.42.0

Pauses the session.

resume(): void​

v0.42.0

Resumes the session.

post_dht_stats(): void​

v0.51.1

post_session_stats(): void​

v0.51.1

torrents(): PoTorrentsHandle​

v0.42.0

Returns an object to find and iterate all torrents in this session.