Search code examples
windowstcpindy

Improving UDP message handling


I've got a PC program receiving data from 20 custom hardware boxes via UDP. Each of these boxes continually sends UDP messages to a single UDP socket on the PC. The messages all contain 10 - 150 bytes of data, and each unit sends about 20 messages in 12 seconds.

Testing shows that some messages are being missed by the PC. Fewer boxes on the network results in fewer missed messages.

The long term solution is to buffer data in the hardware, and let the PC retrieve data as required via TCP, but I need to solve/minimise the missing message problem in the short term until that solution can be deployed. Ideas include: - upgrading the PC - filtering out unnecessary messages before transmission - combining separate UDP messages in the hardware into a single bigger one - using multiple sockets in the PC to receive messages

I'm looking for feedback on these ideas, plus any we might have missed.

The receiving program is a C++Builder program running Indy9.


Solution

  • Thanks to the other guys for suggestions, but for anybody referring back, the solution here was replacing the old PC that had been used (1.6GHz Celeron with 512MB RAM) with the correct spec machine (2GHz Core 2 processor with 2GB RAM).