Checked socket validity