网络示例

Qt Network 提供了一套功能全面的网络类,可支持基于客户端和基于服务器的网络编程。
这些示例演示了使用 Qt Network 进行网络编程的基本要点。
演示如何为网络服务创建客户端。 | |
演示如何接收通过本地网络广播的信息。 | |
演示如何向本地网络上的多个客户端广播信息。 | |
演示如何使用 QDnsLookup 查询主机名。 | |
本示例演示了如何实现客户端 DTLS 连接。 | |
本示例演示了如何实现一个简单的 DTLS 服务器。 | |
演示如何为网络服务创建客户端。 | |
演示如何为网络服务创建服务器。 | |
演示了一个简单的 HTTP 客户端。 | |
演示了如何在客户端使用 SCTP。 | |
演示了如何在服务器端使用 SCTP。 | |
演示如何接收发送到组播组的信息。 | |
演示如何向多播组发送消息。 | |
演示了一个有状态的点对点聊天客户端。 | |
演示如何通过加密(SSL)连接进行通信。 | |
“多线程 Fortune 服务器”示例展示了如何为一个简单的网络服务创建服务器,该服务器使用线程来处理来自不同客户端的请求。该示例旨在与“Fortune 客户端”示例配合运行。 | |
演示了复杂的 TCP/IP 操作。 |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.