Don't assume the existence of res.socket