Networked applications need to handle a bad network. Bad networing conditions such as high latency, dropped packets, packet corruption, delayed packets, out-of-order packets etc can play havoc with your networking code. Luckily Linux provides a kernel level tool than you can use to simulate such conditions, called netem.
You can enable netem module under Networking support, Networking options, QoS and/or fair queueing
You’ll need the tc utility from iproute2 package to configure netem. If you’re building an embedded Linux system with Buildroot, you can enable that package under Target packages, Networking applications