Finish socket between server and client