pub fn harden_socket(stream: &TcpStream) -> Result<()>
Adjusts the low-level socket settings for extra robustness.