Home > Back-end >  Continuous sends UDP packet loss question!!!!
Continuous sends UDP packet loss question!!!!

Time:09-21

The problem is this: the UDP protocol,
Campus network broadcasting, terminal server software to each classroom to send audio data, probably send a every 26 milliseconds, every time send 200 terminals (about 30 subtle) between each terminal, each frame length is 512 byte of data packet loss occurs, not too serious,
Terminal program should be over there will be a problem, because each send a 26 milliseconds, every time send 50 terminal (around 30 subtle) between each terminal, each frame of data length is 512 byte, so basically no packet loss situation,
Want to ask, how can so much terminal, try to avoid the problem of packet loss?

CodePudding user response:

Don't know you this so-called concept of what is not too serious, you should be how many packages to send, receive many packages, do a stress test, such statistics shows a packet loss ratio, to discuss again, if just want to solve the packet loss, can use TCP, udp analog have ready-made libraries can use this, if you send to all other data terminal is the same, a broadcast packet can,

CodePudding user response:

Don't play play rascal made up a number to each packet to send two

CodePudding user response:

Estimate exceeds your bandwidth,
If the interval of 20 milliseconds, almost a second 50 bags,
Each packet 512 bytes, consider Ethernet baotou 14 bytes, IP baotou 20 bytes, udp 8 bytes, baotou baotou: 42 bytes
Sent per second: 200 terminals * 50 * 42 (512 +) bytes=5540000 bytes
Conversion into a bit, is equivalent to 50 m bandwidth, you such a large bandwidth of campus network?

CodePudding user response:

Each packet to send twice, my network will be paralyzed

CodePudding user response:

26 milliseconds refax

Your ability to better understand familiar with the sender device and capacity at the receiving end to just go.
But also 512 bytes per frame, this is too large.

I believe that if you really can according to your requirements make, first-rate equipment

Estimation is feasible is to your demand of terminal points section in series or all together, may be possible

CodePudding user response:

26 milliseconds, about 40 per second sent package, also didn't go campus network, formed a network,
Bandwidth requirements about 35456000 BPS played is 36 m

CodePudding user response:

Each packet to send twice, I estimate the network paralysis, computers and the switch does not necessarily can deal with them

CodePudding user response:

Doloopcn method I also thought, the key also need to consider synchronization, if forward through the terminal, the voice becomes out of sync

CodePudding user response:

Why don't you compress the ilbc

http://www.cnblogs.com/doorsky/p/3266102.html

CodePudding user response:

After compression, terminal there and need to unpack, terminal using stm32F107 MCU, and 26 milliseconds a frame, a little ah

CodePudding user response:

And 512 byte audio data is already out through ADPCM compression data;

CodePudding user response:

Continuous when they see QQ to minimize the lost several packages, I do not know QQ minimize triggered the Windows what events,

CodePudding user response:

refer to the eighth floor LJWMF response:
doloopcn method I also thought, the key also need to consider synchronization, if forward through the terminal, the voice becomes out of sync


Sometimes synchronization is ideal, as long as the time delay in the range of the tolerance allowed line
Even if the way you now, also not necessarily synchronous

Series way perhaps is the true meaning of the closest synchronous way
As we have made the smallpox of sound engineering, speaker series in a line, play music basic not asynchronous

CodePudding user response:

Do a streaming media server, udp send and receive only the start and end of a command

CodePudding user response:

If the bandwidth, and possibility is to send, not in time to consider multi-threaded or thread pool to process,

CodePudding user response:

Now that is broadcast and say what 50 terminal, using UDP is not equal to use radio, radio is one of more.

CodePudding user response:

Since is a local area network (LAN), why not use UDP broadcast directly, so just send only one
Another open a TCP service, if the end found the lost package (packet number discontinuous), is via TCP to collect, such communications pressure is much smaller
  • Related