• <tfoot id='XHm8e'></tfoot>
      <bdo id='XHm8e'></bdo><ul id='XHm8e'></ul>

    <small id='XHm8e'></small><noframes id='XHm8e'>

    1. <i id='XHm8e'><tr id='XHm8e'><dt id='XHm8e'><q id='XHm8e'><span id='XHm8e'><b id='XHm8e'><form id='XHm8e'><ins id='XHm8e'></ins><ul id='XHm8e'></ul><sub id='XHm8e'></sub></form><legend id='XHm8e'></legend><bdo id='XHm8e'><pre id='XHm8e'><center id='XHm8e'></center></pre></bdo></b><th id='XHm8e'></th></span></q></dt></tr></i><div id='XHm8e'><tfoot id='XHm8e'></tfoot><dl id='XHm8e'><fieldset id='XHm8e'></fieldset></dl></div>
      <legend id='XHm8e'><style id='XHm8e'><dir id='XHm8e'><q id='XHm8e'></q></dir></style></legend>
      1. boost.asio 和文件 i/o 有什么关系?

        时间:2023-07-20
        <i id='iJ1o2'><tr id='iJ1o2'><dt id='iJ1o2'><q id='iJ1o2'><span id='iJ1o2'><b id='iJ1o2'><form id='iJ1o2'><ins id='iJ1o2'></ins><ul id='iJ1o2'></ul><sub id='iJ1o2'></sub></form><legend id='iJ1o2'></legend><bdo id='iJ1o2'><pre id='iJ1o2'><center id='iJ1o2'></center></pre></bdo></b><th id='iJ1o2'></th></span></q></dt></tr></i><div id='iJ1o2'><tfoot id='iJ1o2'></tfoot><dl id='iJ1o2'><fieldset id='iJ1o2'></fieldset></dl></div>

        <small id='iJ1o2'></small><noframes id='iJ1o2'>

                <tbody id='iJ1o2'></tbody>
              <legend id='iJ1o2'><style id='iJ1o2'><dir id='iJ1o2'><q id='iJ1o2'></q></dir></style></legend>
              • <bdo id='iJ1o2'></bdo><ul id='iJ1o2'></ul>
                  <tfoot id='iJ1o2'></tfoot>
                1. 本文介绍了boost.asio 和文件 i/o 有什么关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我注意到 boost.asio 有很多涉及套接字、串行端口和各种非文件示例的示例.对于我来说,Google 并没有真正提到 asio 是否是执行异步文件 i/o 的好方法或有效方法.

                  I've noticed that boost.asio has a lot of examples involving sockets, serial ports, and all sorts of non-file examples. Google hasn't really turned up a lot for me that mentions if asio is a good or valid approach for doing asynchronous file i/o.

                  我有大量数据想要异步写入磁盘.这可以通过 Windows(我的平台)中的原生重叠 io 来完成,但我更喜欢有一个独立于平台的解决方案.

                  I've got gobs of data i'd like to write to disk asynchronously. This can be done with native overlapped io in Windows (my platform), but I'd prefer to have a platform independent solution.

                  我很好奇

                  1. boost.asio 有任何类型的文件支持
                  2. boost.asio 文件支持对于日常文件输入/输出已经足够成熟
                  3. 是否会添加文件支持?前景如何?

                  推荐答案

                  boost.asio 是否有任何类型的文件支持?

                  从(我认为)Boost 1.36(包含 Asio 1.2.0)开始,您可以使用 [boost::asio::]windows::stream_handle 或 windows::random_access_handle 来包装 HANDLE 并执行异步读写方法内部使用 OVERLAPPED 结构.

                  Has boost.asio any kind of file support?

                  Starting with (I think) Boost 1.36 (which contains Asio 1.2.0) you can use [boost::asio::]windows::stream_handle or windows::random_access_handle to wrap a HANDLE and perform asynchronous read and write methods on it that use the OVERLAPPED structure internally.

                  用户 Lazin 还提到 boost::asio::windows::random_access_handle 可用于异步操作(例如命名管道,也包括文件).

                  User Lazin also mentions boost::asio::windows::random_access_handle that can be used for async operations (e.g. named pipes, but also files).

                  由于 Boost.Asio 本身现在被广泛使用,并且实现内部使用了重叠 IO,我会说是的.

                  As Boost.Asio in itself is widely used by now, and the implementation uses overlapped IO internally, I would say yes.

                  由于在 Asio 网站上没有找到路线图,我想说不会有新的添加到Boost.Asio 用于此功能.尽管贡献者总是有机会向 Boost.Asio 添加代码和类.也许你甚至可以自己贡献缺失的部分!:-)

                  As there's no roadmap found on the Asio website, I would say that there will be no new additions to Boost.Asio for this feature. Although there's always the chance of contributors adding code and classes to Boost.Asio. Maybe you can even contribute the missing parts yourself! :-)

                  这篇关于boost.asio 和文件 i/o 有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:升压库 下一篇:CMake 无法找到 BOOST 库

                  相关文章

                2. <i id='USuds'><tr id='USuds'><dt id='USuds'><q id='USuds'><span id='USuds'><b id='USuds'><form id='USuds'><ins id='USuds'></ins><ul id='USuds'></ul><sub id='USuds'></sub></form><legend id='USuds'></legend><bdo id='USuds'><pre id='USuds'><center id='USuds'></center></pre></bdo></b><th id='USuds'></th></span></q></dt></tr></i><div id='USuds'><tfoot id='USuds'></tfoot><dl id='USuds'><fieldset id='USuds'></fieldset></dl></div>

                  <small id='USuds'></small><noframes id='USuds'>

                    <bdo id='USuds'></bdo><ul id='USuds'></ul>

                3. <legend id='USuds'><style id='USuds'><dir id='USuds'><q id='USuds'></q></dir></style></legend>

                      <tfoot id='USuds'></tfoot>