Optimize TpuConnection and its implementations and refactor connection-cache to not use dyn in order to enable those changes (#23877)
This commit is contained in:
@ -8,6 +8,7 @@ use {
|
||||
std::os::unix::io::AsRawFd,
|
||||
};
|
||||
use {
|
||||
solana_sdk::transport::TransportError,
|
||||
std::{
|
||||
borrow::Borrow,
|
||||
io,
|
||||
@ -24,6 +25,12 @@ pub enum SendPktsError {
|
||||
IoError(io::Error, usize),
|
||||
}
|
||||
|
||||
impl From<SendPktsError> for TransportError {
|
||||
fn from(err: SendPktsError) -> Self {
|
||||
Self::Custom(format!("{:?}", err))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
pub fn batch_send<S, T>(sock: &UdpSocket, packets: &[(T, S)]) -> Result<(), SendPktsError>
|
||||
where
|
||||
|
Reference in New Issue
Block a user