cleanup .is_err and .is_ok. updated tcp.rs and ip.rs