Hi I'm trying to read a lot of packets to a queue and then sending them one by one based on certain conditions / modifications.
However we do require a context while sending the packet. What would be the best way to achieve this?
-
Should I create a new context for each recv call? This would preserve the context for sending but this would generate a lot of garbage.
-
Or should I re use the same context for all send / receive calls. Would this cause problems? Since I'll have a few consumer threads for reading and a separate one for dispatching.