forked from premiere/premiere-libtorrent
one more python type converter
This commit is contained in:
parent
8ce1b38cbc
commit
8846fe4b93
|
@ -225,6 +225,7 @@ def main():
|
|||
ses.listen_on(options.port, options.port + 10)
|
||||
ses.set_settings(settings)
|
||||
# ses.set_severity_level(lt.alert.severity_levels.info)
|
||||
ses.set_alert_mask(0xfffffff)
|
||||
ses.add_extension(lt.create_ut_pex_plugin)
|
||||
ses.add_extension(lt.create_ut_metadata_plugin)
|
||||
ses.add_extension(lt.create_metadata_plugin)
|
||||
|
|
|
@ -21,11 +21,17 @@ struct endpoint_to_python
|
|||
{
|
||||
return incref(make_tuple(ep.address().to_string(), ep.port()).ptr());
|
||||
}
|
||||
|
||||
static PyObject* convert(udp::endpoint const& ep)
|
||||
{
|
||||
return incref(make_tuple(ep.address().to_string(), ep.port()).ptr());
|
||||
}
|
||||
};
|
||||
|
||||
void bind_alert()
|
||||
{
|
||||
to_python_converter<tcp::endpoint, endpoint_to_python>();
|
||||
to_python_converter<udp::endpoint, endpoint_to_python>();
|
||||
|
||||
using boost::noncopyable;
|
||||
|
||||
|
|
Loading…
Reference in New Issue