async fn read_object_header(
    socket: &mut TcpStream,
    from_peer: SocketAddr,
) -> Result<(usize, usize), ObjectReceiveError> {
    let header = socket
        .read_u64_le()
        .await
        .map_err(|err| ObjectReceiveError::ConnectionError(Some(from_peer), err))?;
    let meta_size = (header as u16) as usize;
    let data_size = (header >> 16) as usize;
    Ok((meta_size, data_size))
}
/// Breaks object header into metadata size (lower 16 bits) and data size (upper 48 bits).
Breaks object header into metadata size (lower 16 bits) and data size (upper 48 bits).
Breaks object header into metadata size ( lower 16 bits ) and data size ( upper 48 bits ) .
async fn read_object_header(
    socket: &mut TcpStream,
    from_peer: SocketAddr,
) -> Result<(usize, usize), ObjectReceiveError> {
    let header = socket
        .read_u64_le()
        .await
        .map_err(|err| ObjectReceiveError::ConnectionError(Some(from_peer), err))?;
    let meta_size = (header as u16) as usize;
    let data_size = (header >> 16) as usize;
    Ok((meta_size, data_size))
}
async fn read_object_header ( socket : & mut TcpStream , from_peer : SocketAddr , ) -> Result < ( usize , usize ) , ObjectReceiveError > { let header = socket . read_u64_le ( ) . await . map_err ( | err | ObjectReceiveError :: ConnectionError ( Some ( from_peer ) , err ) ) ? ; let meta_size = ( header as u16 ) as usize ; let data_size = ( header >> 16 ) as usize ; Ok ( ( meta_size , data_size ) ) }
Breaks object header into metadata size (lower 16 bits) and data size (upper 48 bits).
Breaks object header into metadata size ( lower 16 bits ) and data size ( upper 48 bits ) .
socket
&mut TcpStream
from_peer
SocketAddr
socket
&mut TcpStream
from_peer
SocketAddr