1

我正在用一个众所周知的服务器制作一个简单的 UDP P2P 聊天程序。客户端通过单个 IdUDPServer 从服务器和客户端发送和接收数据。

客户端现在可以登录和注销,即他们可以向服务器发送数据。每当服务器发送任何数据时,它都会被丢弃在节点的 NIC 端,因为正如wireshark 通知的那样,嵌入式 ip 标头校验和为 0x00。

IdUDPServer 设置(客户端/服务器)

主动:真

绑定:

广播:假

缓冲区大小:8192

默认端口:10000

IPVersion:Id_IPv4

线程事件:假

使用的命令

仅使用一个命令

UDPServer.SendBuffer(ED_Host.Text,StrToInt(ED_Port.Text),缓冲区);

类似的配置在我的另一个程序中运行良好。

4

1 回答 1

1

Most NICs will perform checksum validation and generation these days instead of the os network stack. This is to improve performance and is known as checksum offloading. As such wiresshark will report the fact the checksum is missing as an error but it can usually be ignored or the error turned off in the wire shark settings.

Some NIC drivers allow you to turn off checksum offloading. Try this and retest the code

于 2012-12-30T12:19:10.730 回答