B
B
baronexp2021-06-04 08:30:57
linux
baronexp, 2021-06-04 08:30:57

How to buffer UDP packets?

Initial data: when the server receives a UDP packet, it starts processing it (I just set a small delay), after which it sends the packet back to the client.
Problem: if another packet arrives at the server while the packet is being processed, it simply will not be intercepted by the program. How to save it in the buffer so that you can start processing it after the program has finished with the current one? Well, or how to process them both at the same time?
Ps you need to use exactly UDP, tk. these are raw sockets and I need to change the fields in the header. There must also be a delay (the packet cannot be sent back immediately).
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2021-06-04
@Griboks

If you are not working directly with the network adapter, then your network card should by default store all packets in the receive and send buffers and sequentially "give" them to the upper levels. Most likely, your program is simply not reading this buffer correctly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question