making socket read-only