UDP 通信在 linux 上丢失,使用 C# .NET Core 2.1 时,"UDP sockets" 在 linux 上的管理方式与 windows 上的管理方式不同吗?

UDP communication is lost on linux, are "UDP sockets" managed differentely on linux compared to windows when using C# .NET Core 2.1?

我有一个 C# .NET Core 2.1 应用程序 运行 在 windows 上没问题。传入 UDP 数据包的侦听器任务和发送 UDP 数据包的另一个线程。该软件使用 UDP 之上的专有协议与嵌入式设备通信,该协议需要 "PING-PONG" (ACK) 才能 "stay alive"。

当 运行在 windows 上连接应用程序时,我的通信没有问题。当我在 Linux Ubuntu (18.04) 上 运行 this 时,我有时无法沟通。有时通信丢失(数据包没有到达应用程序,尽管它们在 Wireshark 中可见)等等,基本上它表现不好......

该代码或多或少地使用了 UDP 通信 "back-bone" 在线教程中的基本内容(侦听器等)。你知道这里发生了什么吗?

事实证明它是 linux 个套接字缓冲区的组合,我增加到:

    net.core.rmem_max=26214400
    net.core.rmem_default=26214400
    net.core.wmem_max=26214400
    net.core.wmem_default=26214400

(在 /etc/sysctl.conf 中)

和专有协议特定的错误...