Re: CFSocketSendData silently dropping packets
Re: CFSocketSendData silently dropping packets
- Subject: Re: CFSocketSendData silently dropping packets
- From: "Justin C. Walker" <email@hidden>
- Date: Mon, 29 May 2006 22:35:28 -0700
On May 29, 2006, at 22:03 , Andrew White wrote:
When ARP resolution is slow, my CFSocketSendData call silently
fails to
send packets.
[snip]
I fire off three of these messages in quick succession. If the arp
cache
is not primed the Mac must perform arp resolution. Sometimes, the arp
message takes as long as 1-2 ms to return. In such cases, the
first two
messages return success (or don't trigger the log messages, in any
case)
but fail to actually be written to the network. The third message is
correctly sent.
This is the way ARP support is implemented: the last-sent packet to a
specific address is kept; previous ones are dropped.
I would have assumed that either the messages would be sent or that
they
would get a timeout fail, not that they would be reported as
successful and
not sent. Can anyone shed some light on my situation?
Yup. UDP datagram service does not guarantee delivery. The udp code
takes the packet from the sender, readies it for output, and sends it
on its way. No buffering takes place. If you send too quickly, you
get the behavior you are seeing. This is part of the protocol
definition, rather than an implementation issue.
Cheers,
Justin
--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
My wife 'n kids 'n dogs are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
-----------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden