PRDescIdentity 编辑
The identity of a file descriptor's layer.
Syntax
#include <prio.h> typedef /wiki/en-US/docs/Mozilla/Projects/NSPR/Reference/PRUintn PRDescIdentity;
Description
File descriptors may be layered. Each layer has it own identity. Identities are allocated by the runtime and are to be associated (by the layer implementor) with all file descriptors of that layer. It is then possible to scan the chain of layers and find a layer that one recognizes, then predict that it will implement a desired protocol.
There are three well-known identities:
PR_INVALID_IO_LAYER
, an invalid layer identity, for error returnPR_TOP_IO_LAYER
, the identity of the top of the stackPR_NSPR_IO_LAYER
, the identity used by NSPR proper
Layers are created by /wiki/en-US/docs/Mozilla/Projects/NSPR/Reference/PR_GetUniqueIdentity
. A string may be associated with a layer when the layer is created. The string is copied by the runtime, and PR_GetNameForIdentity
returns a reference to that copy. There is no way to delete a layer's identity after the layer is created.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论