Tornado 6.5 Documentation
client. You can also override open and on_close to handle opened and closed connections. Custom upgrade response headers can be sent by overriding set_default_headers or prepare. See http://dev.w3.org/html5/websockets/ to its SSLContext equivalent, and may be used when a component which accepts both forms needs to upgrade to the SSLContext version to use features like SNI or ALPN. Changed in version 6.2: Added server_side avoid spurious deprecation warnings, users of Python 3.10 should upgrade to at least version 3.10.9, and users of Python 3.11 should upgrade to at least version 3.11.1. • Tornado submodules are now imported0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
client. You can also override open and on_close to handle opened and closed connections. Custom upgrade response headers can be sent by overriding set_default_headers or prepare. See http://dev.w3.org/html5/websockets/ html#ssl.SSLContext] equivalent, and may be used when a component which accepts both forms needs to upgrade to the SSLContext [https://docs.python.org/3/library/ssl.html#ssl.SSLContext] version to use features avoid spurious deprecation warnings, users of Python 3.10 should upgrade to at least version 3.10.9, and users of Python 3.11 should upgrade to at least version 3.11.1. Tornado submodules are now imported0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
引用的值可能已经被丢弃了,为了使用 Weak所指向的值,我们必须确保其值 仍然有效。为此可以调用 Weak 实例的 upgrade 方法,这会返回 Option >。如果 Rc 值还未被丢弃,则结果是 Some;如果 Rc 已被丢弃,则结果是 None。因为 upgrade 返回一个 Option >,Rust 会确保处理 Some 和 None 的情况,所以它不会返回无效指针。 children: RefCell::new(vec![]), }); println!("leaf parent = {:?}", leaf.parent.borrow().upgrade()); let branch = Rc::new(Node { value: 5, parent: RefCell::new(Weak::new()) borrow().upgrade()); } 示例 15-28:一个 leaf 节点,其拥有指向其父节点 branch 的弱引用 创建 leaf 节点类似于示例 15-27,除了 parent 字段有所不同:leaf 开始时没有父节点,所 以我们新建了一个空的 Weak 引用实例。 351/562Rust 程序设计语言 简体中文版 此时,当尝试使用 upgrade 方法获取 leaf 0 码力 | 562 页 | 3.23 MB | 9 天前3
共 3 条
- 1