UDP Server Socket Buffer Overflow

前端 未结 3 656
野趣味
野趣味 2021-02-09 17:20

I am writing a C++ application on Linux. My application has a UDP server which sends data to clients on some events. The UDP server also receives some feedback/acknowledgement

3条回答
  •  爱一瞬间的悲伤
    2021-02-09 17:48

    Q: Is it correct to use the same socket for sending/receiving UDP data with Mulitiple clients ?

    A: Yes, it is correct.

    Q: How to find the maximum number of UDP Feedback/Acknowledge Packets my application can handling without UDP Socket Buffer Overflow (since I am reading at every 4secs, if I receive lot of packets within this 4secs I might loose some packet ie., I need to find the rate : noofpackets/sec I can handle safely)?

    A: The bottleneck might be the network bandwidth, or CPU, or memory. You could simply do a testing, using a client which sends ACK to the server with consecutive number, and verify whether there is packet loss at the server.

提交回复
热议问题