Re: Can an app see the same UDP packet multiple times?
- From: "m" <m@xxx>
- Date: Wed, 25 Jan 2006 18:08:33 -0500
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
>>
>>
>
>
.
- References:
- Can an app see the same UDP packet multiple times?
- From: Dean Roddey
- Re: Can an app see the same UDP packet multiple times?
- From: Eugene Gershnik
- Re: Can an app see the same UDP packet multiple times?
- From: Dean Roddey
- Re: Can an app see the same UDP packet multiple times?
- From: Arkady Frenkel
- Re: Can an app see the same UDP packet multiple times?
- From: Dean Roddey
- Re: Can an app see the same UDP packet multiple times?
- From: m
- Re: Can an app see the same UDP packet multiple times?
- From: Dean Roddey
- Re: Can an app see the same UDP packet multiple times?
- From: Alexander Nickolov
- Can an app see the same UDP packet multiple times?
- Prev by Date: Re: Using visual basic to send a message across a network
- Next by Date: Re: Can an app see the same UDP packet multiple times?
- Previous by thread: Re: Can an app see the same UDP packet multiple times?
- Next by thread: Re: Can an app see the same UDP packet multiple times?
- Index(es):
Relevant Pages
|