展示HN:SwiftNet 0.6.0 – 轻量级l2 C网络库(pcap和早期DPDK)
SwiftNet 是一个小型的 C 网络库,工作在第二层(Layer 2),使用 libpcap(现在还拥有一个非常早期的 DPDK 实现)。<p>我构建它是因为厌倦了使用套接字或复杂的库,想要一个足够简单的解决方案来满足我的游戏需求,同时还能通过编译时的自定义来提高速度。<p>0.6.0 版本的更改:
- 动态库构建
- 修改了缓冲区函数的 API
- 简单的 DPDK 实现,目前仅能在回环模式下使用
- 更清晰的源代码
- 在最大警告级别下构建
- 为缓冲区添加了偏移写入功能
- 性能优化
- 支持 Ubuntu Linux arm64
- 添加了 DISABLE_DYNAMIC_RATE_LIMITING 标志<p>新版本发布: <a href="https://github.com/Morcules/SwiftNet/releases/tag/0.6.0" rel="nofollow">https://github.com/Morcules/SwiftNet/releases/tag/0.6.0</a>
代码库: <a href="https://github.com/Morcules/SwiftNet" rel="nofollow">https://github.com/Morcules/SwiftNet</a>
查看原文
SwiftNet is a small C networking library that works at Layer 2 with libpcap (and now has a very early DPDK implementation).<p>I built it because I was tired of using sockets or complex libraries and wanted something simple enough for my game while still being able to go fast using compile time customizations<p>0.6.0 changes:
- Dynamic library build
- Changed API in buffer functions
- Simple DPDK implementation only usable right now with loopback
- Cleaner source code
- Built with maximum warnings enabled
- Added write at offset function for buffer
- Performance optimizations
- Working on ubuntu linux arm64
- Added DISABLE_DYNAMIC_RATE_LIMITING flag<p>New version release: <a href="https://github.com/Morcules/SwiftNet/releases/tag/0.6.0" rel="nofollow">https://github.com/Morcules/SwiftNet/releases/tag/0.6.0</a>
Repo: <a href="https://github.com/Morcules/SwiftNet" rel="nofollow">https://github.com/Morcules/SwiftNet</a>