finish socket