checkpoint socket code