Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从端口连续接收 UDP 数据包。我正在使用 recvfrom() 来接收数据包。如何在收到单个数据包后放置延迟。我想收到超过 50 个数据包。为此,我需要帮助。提前致谢....
网络堆栈会为您捕获所有发往该套接字地址的数据包并将其放入队列中。只需使用 recvfrom 读取排队的数据。如果您希望您的应用程序等待下一个接收事件,您可以使用 select 函数。