Pull perf into a separate module. (#6718)

automerge
This commit is contained in:
anatoly yakovenko
2019-11-04 20:13:43 -08:00
committed by Grimes
parent 3133ee2401
commit b825d04597
36 changed files with 742 additions and 664 deletions

View File

@@ -1,12 +1,11 @@
//! The `recvmmsg` module provides recvmmsg() API implementation
use crate::packet::Packet;
pub use solana_ledger::packet::NUM_RCVMMSGS;
use std::cmp;
use std::io;
use std::net::UdpSocket;
pub const NUM_RCVMMSGS: usize = 128;
#[cfg(not(target_os = "linux"))]
pub fn recv_mmsg(socket: &UdpSocket, packets: &mut [Packet]) -> io::Result<(usize, usize)> {
let mut i = 0;