SKILL

boost-asio-pro

适用于任何使用 Boost.Asio 或独立 Asio 的 C++ 网络代码,在编写或审查之前使用,涵盖 TCP/UDP、SSL、定时器、strand、io_context、co_spawn、awaitable 和完成处理器。应用生命周期、strand 和取消规则,避免典型异步错误。

译文已校对
查看英文原文

Use for any C++ networking code with Boost.Asio or standalone Asio (TCP/UDP, SSL, timers, strands, io_context, co_spawn, awaitable, completion handlers), before writing or reviewing it. Applies lifetime, strand and cancellation rules that avoid the classic async bugs.

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Boost.Asio / standalone Asio
  • Overview
  • Step 1: pick the style (do this before writing code)
  • Step 2: version floors (verified by compiling, not from docs)
  • Step 3: the rules that are actually easy to get wrong
  • Anti-Patterns
  • Boost.Asio vs standalone Asio
  • Before you call it done

Write async C++ networking code that compiles on the user's Boost, not the newest one. Asio's API changed shape three times (classic ioservice → iocontext → C++20 coroutines) and most Asio code on the internet is from the first era, so pick the style from the toolchain first, then follow that style's reference file. References: Boost.Asio · standalone Asio Use this skill whenever async C++ networking code is being written or reviewed — and especially when the target toolchain is old, where coroutine examples simply will not compile. The three worked implementations it references are CI-verified from Boost 1.62 (2016) through 1.90. Determine the Boost (or Asio) version and the C++ standard actually in use — findpackage(Boost) output, dpkg -l libboost-dev, brew info boost, CMAKECXXSTANDARD, or ask. Do not assume the newest. | Boost | C++ std | Style | Read | |-------|---------|-------|------| | ≥ 1.77 | C++20 | Coroutines (coawait + awaitable ) — preferred | references/coroutines.md | | ≥ 1.74 | C++11–17 | Completion handlers (callbacks) — the portable baseline | references/pre-cpp20.md | | ≥ 1.80 | C++11–17 | Stackful asio::spawn + yieldcontext (links Boost.Coroutine — not header-on

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
alirezarezvani/claude-skills
源文件
engineering/boost-asio-pro/SKILL.md
固定版本
8f082544116fc0d014188e521ca40304cdfc86b0
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:alirezarezvani/claude-skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:46.607Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。