Bedeho Mender
2016-07-11 21:41:03 UTC
We have a desktop application built on libtorrent, and we are looking to
turn much of it´s core features into a reusable library, so that it can
power a more general set of applications (e.g. RPC daemon, mobile app,
etc.).
We want to allow the library to be used in a context where there are
multiple independent simultaneous users, e.g. different RPC clients calls
against an RPC daemon. In that situation, no user can be certain about how
public state changes in the library - or lack there of, correspond to calls
made to the library. This is because libtorrent does not have any way of
associating callbacks or identifiers with calls, so that
alerts can later be mapped to these calls.
The solution we are currently considering is to run regular libtorrent
session/torrent operations from our own plugin, and therefore on the main
libtorrent thread, and then send back richer custom alerts which have this
information. We are already using this approach to allow a user to control
the plugin itself, and it works very well.
Is there some simpler approach we are overlooking, if not, has there ever
been any serious consideration given to adding callbacks/identifiers to
libtorrent operations/alerts.
Bedeho
ᐧ
turn much of it´s core features into a reusable library, so that it can
power a more general set of applications (e.g. RPC daemon, mobile app,
etc.).
We want to allow the library to be used in a context where there are
multiple independent simultaneous users, e.g. different RPC clients calls
against an RPC daemon. In that situation, no user can be certain about how
public state changes in the library - or lack there of, correspond to calls
made to the library. This is because libtorrent does not have any way of
associating callbacks or identifiers with calls, so that
alerts can later be mapped to these calls.
The solution we are currently considering is to run regular libtorrent
session/torrent operations from our own plugin, and therefore on the main
libtorrent thread, and then send back richer custom alerts which have this
information. We are already using this approach to allow a user to control
the plugin itself, and it works very well.
Is there some simpler approach we are overlooking, if not, has there ever
been any serious consideration given to adding callbacks/identifiers to
libtorrent operations/alerts.
Bedeho
ᐧ