refactor send socket signal