use strlen instead of const
fix read ip problem