Re: Can an app see the same UDP packet multiple times?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I agree.

The overhead of using a 4-byte field vs. a 1-byte field is negligible on a
modern network.





"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:OLcc7EeIGHA.2460@xxxxxxxxxxxxxxxxxxxxxxx
> Could that be another instance of famous last words :)...
> 8-bit packet ID is dangerously narrow. I'd play safe and
> use a 32-bit value instead.
>
> BTW, speaking from experience, sometimes 32-bit packet IDs
> may not be enough either...
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@xxxxxxxx
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Dean Roddey" <droddey@xxxxxxxxxxxxxxxx> wrote in message
> news:uPv4r2WIGHA.3000@xxxxxxxxxxxxxxxxxxxxxxx
>>I went ahead and bit the bullet and implemented a rejection scheme. Each
>>outgoing event gets a unique id, based on an MD5 hash id generated for
>>each application when it loads (behind their backs of course, down in the
>>event send/receive subsystem), and then the low byte of that hash is set
>>to an incrementing sequence number for each event that goes out. It'll
>>wrap at 255, but that's way more than long enough to handle duplicate
>>rejection. It would be a truely pathological application that sent more
>>than 255 events in less than a few minutes. The receiving thread is
>>keeping the last 128 ids it's seen, once in a hash table for fast lookup
>>and another copy in a deque so it can quickly toss the oldest id when a
>>new one comes in. I think that 128 will be more than enough, but I can
>>increase it if needed. If it's seen the id, it just doesn't drop the new
>>event into the processing queue.
>>
>> -------------------------------------
>> Dean Roddey
>> Chairman/CTO, Charmed Quark Systems
>> www.charmedquark.com
>>
>> "m" <m@xxx> wrote in message
>> news:%23JkJClSIGHA.3120@xxxxxxxxxxxxxxxxxxxxxxx
>>> Yes, this is likly the cause - but don't rely on it.
>>>
>>> As has been mentioned aready, any arbitrary packet may arrive zero or
>>> more times.
>>>
>>> "Dean Roddey" <droddey@xxxxxxxxxxxxxxxx> wrote in message
>>> news:Om8oeZRIGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
>>>> I'm assuming that it's happening because the user has multiple network
>>>> adaptors, all on the local subnet, one of them wireless, and that I'm
>>>> listening on 0.0.0.0 so as to avoid having to bind to a particular
>>>> adapter. The more of them he enables, the more 'echos' he sees. So I
>>>> think I'm just seeing them coming in on multiple adapters. The rest of
>>>> us, who have single adapter systems, aren't seeing this problem.
>>>>
>>>> -------------------------------------
>>>> Dean Roddey
>>>> Chairman/CTO, Charmed Quark Systems
>>>> www.charmedquark.com
>>
>>
>
>


.



Relevant Pages

  • Re: Fundamentals question, is this how it works?
    ... Microsoft MVP, MCSD ... Knowin when that second packet started is my problem. ... stream receving the buffer size each time. ... then the receiving side might ...
    (microsoft.public.win32.programmer.networks)
  • Re: raw socket send problem
    ... I'm not familiar with Mono, does it support raw sockets? ... Microsoft MVP, MCSD ... When I use my IP address in IP packet header it works fine. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Non-secure hash with a secure cipher
    ... any changes to the hash (thru a ciphertext ... packet i covers the contents of packet i and also the MAC in packet ... Chains MACs would work well for a voice channel, ...
    (sci.crypt)
  • Re: Can an app see the same UDP packet multiple times?
    ... BTW, speaking from experience, sometimes 32-bit packet IDs ... >outgoing event gets a unique id, based on an MD5 hash id generated for each ... >>> I'm assuming that it's happening because the user has multiple network ... >>> us, who have single adapter systems, aren't seeing this problem. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Can an app see the same UDP packet multiple times?
    ... I went ahead and bit the bullet and implemented a rejection scheme. ... outgoing event gets a unique id, based on an MD5 hash id generated for each ... >> us, who have single adapter systems, aren't seeing this problem. ... >> Chairman/CTO, Charmed Quark Systems ...
    (microsoft.public.win32.programmer.networks)