[feature/socket] remove depend is_valid function