libtorrent API 文档(中文版)
作者:Arvid Norberg, ******************
翻译:小朋友软件, ***************
文档原处:www.rasterbar/products/libtorrent/manual.html
version:0.14.5
内容列表
·总观
·网络原语
·session
osession()
o~session()
opause() resume() is_paused()
oabort()
oadd_torrent()
oremove_torrent()
ofind_torrent() get_torrents()
oset_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()
oset_max_uploads() set_max_connections()
onum_uploads() num_connections()
oset_max_half_open_connections() max_half_open_connections()
oload_asnum_db() load_country_db() int as_for_ip()
oload_state() state()
oset_ip_filter()
oget_ip_filter()
ostatus()
oget_cache_status()
oget_cache_info()
ois_listening() listen_port() listen_on()
opop_alert() set_alert_mask() wait_for_alert() set_alert_queue_size_limit()
oadd_extension()
oset_settings() set_pe_settings()
oset_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()
opeer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()
ostart_dht() stop_dht() set_dht_settings() dht_state()
oadd_dht_node() add_dht_router()
ostart_lsd() stop_lsd()
ostart_upnp() stop_upnp()
ostart_natpmp() stop_natpmp()
∙entry
ointeger() string() list() dict() type()
ooperator[]
ofind_key()
∙torrent_info
otorrent_info()
oadd_tracker()
ofiles() orig_files()
orename_file()
obegin_files() end_files() rbegin_files() rend_files()
onum_files() file_at()
omap_block()
omap_file()
ourl_seeds() add_url_seed()
otrackers()
ototal_size() piece_length() piece_size() num_pieces()
ohash_for_piece() hash_for_piece_ptr() info_hash()
oname() comment() creation_date() creator()
opriv()
onodes()
oadd_node()
ometadata() metadata_size()
∙torrent_handle
opiece_priority() prioritize_pieces() piece_priorities()
ofile_priority() prioritize_files() file_priorities()
ofile_progress()
osave_path()
omove_storage()
orename_file()
oget_storage_impl()
oforce_reannounce()
oscrape_tracker()
oconnect_peer()
oname()
oset_ratio()
oset_upload_limit() set_download_limit() upload_limit() download_limit()
oset_sequential_download() is_sequential_download()
oset_peer_upload_limit() set_peer_download_limit()
opause() resume() is_paused()
oforce_recheck()
oclear_error()
oresolve_countries()
ois_seed()
ois_auto_managed() auto_managed()
ohas_metadata()
oset_tracker_login()
otrackers() replace_trackers()
oadd_url_seed() remove_url_seed() url_seeds()
oqueue_position() queue_position_up() queue_position_down() queue_position_top() queue_position_bottom()
ouse_interface()
oinfo_hash()
oset_max_uploads() set_max_connections()
osave_resume_data()
ostatus()
oget_download_queue()
oget_peer_info()
session下载oget_torrent_info()
ois_valid()
∙torrent_status
∙peer_info
∙session_settings
∙pe_settings
∙proxy_settings
∙ip_filter
oip_filter()
oadd_rule()
oaccess()
oexport_filter()
∙big_number
∙bitfield
∙hasher
∙fingerprint
∙UPnP and NAT-PMP
oadd_mapping
odelete_mapping
orouter_model()
∙free functions
oidentify_client()
oclient_fingerprint()
obdecode() bencode()
oadd_magnet_uri()
omake_magnet_uri()
∙alerts
oexternal_ip_alert
olisten_failed_alert
oportmap_error_alert
oportmap_alert
ofile_error_alert
ofile_renamed_alert
ofile_rename_failed_alert
otracker_announce_alert
otracker_error_alert
otracker_reply_alert
odht_reply_alert
otracker_warning_alert
oscrape_reply_alert
oscrape_failed_alert
ourl_seed_alert
ohash_failed_alert
opeer_ban_alert
opeer_error_alert
oinvalid_request_alert
otorrent_finished_alert
operformance_alert
ometadata_failed_alert
ometadata_received_alert
ofastresume_rejected_alert
opeer_blocked_alert
ostorage_moved_alert
ostorage_moved_failed_alert
otorrent_paused_alert
otorrent_resumed_alert
osave_resume_data_alert
osave_resume_data_failed_alert
odispatcher
∙exceptions
oinvalid_handle
oduplicate_torrent
oinvalid_encoding
otype_error
oinvalid_torrent_file
∙storage_interface
oinitialize()
ohas_any_file()
oread()
owrite()
omove_storage()
overify_resume_data()
owrite_resume_data()
omove_slot()
oswap_slots()
oswap_slots3()
ohash_for_slot()
orename_file()
orelease_files()
odelete_files()
∙magnet links
∙queuing
odownloading
oseeding
∙fast resume
ofile format
∙threads
∙storage allocation
osparse allocation
ofull allocation
ocompact allocation
∙extensions
ometadata from peers
oHTTP seeding
∙filename checks
∙acknowledgments
概述
libtorrent库的接口由少量几个类组成。最主要的类是session类,它有一个为所有任务服务的主循环.
基本的用法如下:
●创建一个session
●打开 扩展(查看 add_extension()).
●打开 DHT, LSD, UPnP, NAT-PMP 等 (查看 start_dht(), stop_dht(), set_dht_settings(), dht_state(), start_lsd(), stop_lsd(), start_upnp(), stop_upnp 和start_natpmp(), stop_natpmp());
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论