Home > other >  Udp multithreading next to the same sock to send packets, the receiver packet loss
Udp multithreading next to the same sock to send packets, the receiver packet loss

Time:11-17

UDP
L2 layer data transmission

The server side,,,,

Thread one:
While (1)
{
Send a package
Send the package b
}
Thread 2:
{
After receiving the e package:
{
Send package c
Send the package d
}
}



The client,,,,

Thread one:
While (1)
{
Send e package
}

Thread 2:
While (1)
{
Receive package (a/b/c/d)
Case: a
Case: b
Case: c
Case: d
}


Hundreds of times before the contract is no problem, do not regularly to receive specific times after the loss of packets d
Wireshark can catch to send and receive all success
Be lost packets d, but hundreds of times before the start of a send does not lose any package,

CodePudding user response:

Udp packet loss is not very normal?
  • Related