Concurrency handling of ReadPackets and SendPackets

Home Forums Discussions Support Concurrency handling of ReadPackets and SendPackets

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11257
    Riccardp
    Participant

      Hello,

      I have a simple questions about concurrency: are ReadPackets and SendPackets thread safe? Or may multiple concurrent calls cause problems?

      I’m using the .NET wrapper of Winpkfilter if this makes any difference.

      Thank you

      #11260
      Vadim Smirnov
      Keymaster

        Yes, entire library is thread safe.

        The only thing to note about it is that there is only one instance of each network interface (setting mode, event and etc..) and only one copy of each packet (if one thread taken packet others threads won’t be able to get it). Though for one customer we created a special build with multiply filtering layers (e.g. packet injected on one layer can be picked up again on the next layer).

        #11261
        Riccardp
        Participant

          Thank you for the clarification. One last question: does the call of SendPacket/s return immediatly or does it wait for the sending operation to complete before returning?

          #11262
          Vadim Smirnov
          Keymaster

            Yes, SendPacket/s return immediately.

            #11263
            Riccardp
            Participant

              Great thank you for all the answers and explanations!

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.