/// Convert a given token (socket) ID into a session ID.
Convert a given token (socket) ID into a session ID.
Convert a given token ( socket ) ID into a session ID .
fn token2session(token_id: usize) -> u32 {
    assert!(mem::size_of::<usize>() >= 4);
    let mask = ((1 as usize) << 24) - 1;
    assert!((token_id & !mask) == (1 << 24));
    (token_id & mask) as u32
}
fn token2session ( token_id : usize ) -> u32 { assert ! ( mem size_of usize ( ) 4 ) ; let mask = ( ( 1 as usize ) << 24 ) - 1 ; assert ! ( ( token_id mask ) ( 1 24 ) ) ; ( token_id & mask ) as u32 }
Convert a given token (socket) ID into a session ID.
Convert a given token ( socket ) ID into a session ID .
token_id
usize