mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic: add #[inline] to handle_readable_socket and handlers
Also update aquatic_bench comment with new bench results
This commit is contained in:
parent
2fd732efc6
commit
32edee9bbb
3 changed files with 10 additions and 5 deletions
|
|
@ -11,6 +11,7 @@ use crate::common::*;
|
|||
use crate::config::Config;
|
||||
|
||||
|
||||
#[inline]
|
||||
pub fn handle_connect_requests(
|
||||
state: &State,
|
||||
rng: &mut StdRng,
|
||||
|
|
@ -41,6 +42,7 @@ pub fn handle_connect_requests(
|
|||
}
|
||||
|
||||
|
||||
#[inline]
|
||||
pub fn handle_announce_requests(
|
||||
state: &State,
|
||||
config: &Config,
|
||||
|
|
@ -128,6 +130,7 @@ pub fn handle_announce_requests(
|
|||
}
|
||||
|
||||
|
||||
#[inline]
|
||||
pub fn handle_scrape_requests(
|
||||
state: &State,
|
||||
responses: &mut Vec<(Response, SocketAddr)>,
|
||||
|
|
@ -177,6 +180,7 @@ pub fn handle_scrape_requests(
|
|||
/// in order to avoid returning too homogeneous peers.
|
||||
///
|
||||
/// Don't care if we send back announcing peer.
|
||||
#[inline]
|
||||
pub fn extract_response_peers(
|
||||
rng: &mut impl Rng,
|
||||
peer_map: &PeerMap,
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ fn create_socket(config: &Config) -> ::std::net::UdpSocket {
|
|||
|
||||
|
||||
/// Read requests, generate and send back responses
|
||||
#[inline]
|
||||
fn handle_readable_socket(
|
||||
state: &State,
|
||||
config: &Config,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue