method socket close