Send client name in extended handshake
This commit is contained in:
parent
bafd958d0d
commit
1d48a5198b
2 changed files with 6 additions and 1 deletions
|
|
@ -93,10 +93,14 @@ pub use librqbit_core::torrent_metainfo::*;
|
|||
mod tests;
|
||||
|
||||
/// The cargo version of librqbit.
|
||||
pub fn version() -> &'static str {
|
||||
pub const fn version() -> &'static str {
|
||||
env!("CARGO_PKG_VERSION")
|
||||
}
|
||||
|
||||
pub const fn client_name_and_version() -> &'static str {
|
||||
concat!("rqbit ", env!("CARGO_PKG_VERSION"))
|
||||
}
|
||||
|
||||
pub fn try_increase_nofile_limit() -> anyhow::Result<u64> {
|
||||
Ok(rlimit::increase_nofile_limit(1024 * 1024)?)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue