finish socket programming with socket