Reply To: C# Collect packets in queue before processing them

Home Forums Discussions Support C# Collect packets in queue before processing them Reply To: C# Collect packets in queue before processing them

#9596
Vadim Smirnov
Keymaster

    You must process the packet before calling

    Ndisapi.SendPacketToAdapter(driverPtr, ref request);

    The call above injects the packet into the network flow and processing does not make any sense after this point.

    If I understand you right then you are working over bandwidth limiter solution for outgoing traffic. So, instead of SendPacketToAdapter you should put packet into the queue (List<INTERMEDIATE_BUFFER> an example). A different thread can pop packets from the queue and call SendPacketToAdapter for them when time passes or queue reaches some predefined limit.