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 return
  • PR_TOP_IO_LAYER, the identity of the top of the stack
  • PR_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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:68 次

字数:1626

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文