将 DTLS 与套接字服务器 (ThreadedUDPServer) 结合使用

发布于 2025-01-11 19:18:49 字数 467 浏览 1 评论 0原文

我对网络编程非常陌生,所以如果我犯了新手错误,请耐心等待。

我使用 Python 的 socketserver 库中的 ThreadedUDPServer 编写了一个网络引擎,它在一定程度上增加了可靠性(UDP 因为这主要用于游戏服务器,我希望通过轻量级标头保持较低的性能和网络开销)。

现在我想通过使用 DTLS 来保护它(现在尝试使用 python3-dtls),但我找不到任何已经完成的示例。在python3-dtls的文档中,提到它已经使用ThreadedTCPServer进行了测试< em>(这是因为 PyDTLS 对连接相关调用的模拟),但我未能成功找到 UDP 等效项的工作实现。

我使用的是最新版本的Python,除此之外没有任何外部库。

任何信息或正确方向的推动将不胜感激!

I am very new to network programming so please bear with me if I make newbie mistakes.

I have written a networking engine using ThreadedUDPServer from Python's socketserver library, which add layers of reliability to a certain level (UDP because this is primarily for a game server and I want to keep the performance and network overhead low with lightweight headers).

Now I want to secure it by using DTLS (attempting to use python3-dtls right now) but I'm not able to find any examples of this being done already. In the documentation for python3-dtls, it is mentioned that it has been tested with ThreadedTCPServer (this works because of PyDTLS’s emulation of connection-related calls) but I have been unsuccessful in finding working implementations of the UDP equivalent.

I'm using the latest version of Python and no external libraries apart from this.

Any information or a nudge in the right direction will be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文