I want to implement queue on server side functions:
- store the packets in queue (copy them from recvfrom buffer)
- search the packets by id's and retrieve them for retransmission
- take the 2 packets with different id's and process them together
- delete packets with the same id
- delete all the packets from the queue when timer expires
I have reading a lot, but I'm not sure what is the best data structure to use for this problem, linked lists, hash tables? I don't have experience in this field to I need the advice for the most efficient algorithm
Thank you