Implement getsockopt(2). So far, only SOL_SOCKET/SO_ERROR.