Reply To: how many adapters can we capture and modify packets on?

Home Forums Discussions Support how many adapters can we capture and modify packets on? Reply To: how many adapters can we capture and modify packets on?

#6117
Steven
Participant

    I guess if I just create only one thread to capture all packets on different adapters, there should be a performance problem or sometimes network choke.

    Because in the Passthrou sample:


    WaitForSingleObject ( hEvent, INFINITE );
    ResetEvent(hEvent);

    while(api.ReadPacket(&Request))
    {

    }
    If I update this codes like:
    switch( WaitForMultipleObjects(2, hEvent, false, INFINITE ) )
    {
    case WAIT_OBJECT_0:
    set parameters on Request;
    break;
    case WAIT_OBJECT_0 + 1:
    set parameters on Request;
    break;

    }

    while(api.ReadPacket(&Request))
    {

    }

    if there are packets in a listened queue, the code always read packets until there is no packets in this queue; in the worst case, this code needs to read 500 packets before it deals with other adapters, so other packets in other queues on other adapters will generate similar network traffic jams.

    Am I right?? just post a discussion on how to fix the performance issue.

    Thanks.