Re: Question on sending data over UDP endpoints
Re: Question on sending data over UDP endpoints
- Subject: Re: Question on sending data over UDP endpoints
- From: Igor garnov <email@hidden>
- Date: Thu, 1 Jul 2004 10:29:40 +0400
Hi Justin and thanks very much for your early reply.
I understand very well that UDP is NOT reliable. However, I experience
the
following situation with my application:
I send a UDP datagram, and immediately install an OT timer, which will
fire
in 5 seconds.
But before this timer actually fires, I receive an ICMP message of type
3
(Destination unreachable) and code 0 (Network unreachable error). I
strongly suspect that this message has something to do with the data I
have
sent, because there is really nothing else I do, except send this UDP
packet.
After 5 seconds my timer fires and I call OTCloseProvider on the
endpooint,
after which my application freezes.
Should I call OTRcvUDErr before calling OTCloseProvider?
What should I do with the ICMP message apparently pertaining to this
endpoint, which I have already read? Maybe, I should peek at this ICMP
data
without actually reading it into my buffer? Will this ensure that a
higher-level protocol will receive it and take appropriate action (like
calling my notifier routine with T_UDERR code)?
Any ideas are greatly appreciated.
Igor
On Thursday, Jul 1, 2004, at 00:10 Europe/Moscow, Justin Walker wrote:
On Jun 30, 2004, at 13:00, Igor garnov wrote:
Hello,
My Carbon CFM application uses Open Transport and works with
endpoints in asynchronous mode, installing a notifier routine.
if I use "OTSndUData" to send some data to a foreign host, should I
also install an OT timer that fires in, say, 5 seconds if no reply is
given, or will my notifier routine be called with "T_UDERR" code to
indicate that the foreign host is down / is not listening on the port
specified? Will I actually receive an ICMP message, which will
consequently trigger "T_UDERR" event?
The spec for UDP sez that it is "unreliable". That means that you
will receive no system notification, either from the local or remote
systems, to indicate a problem in transmission or reception of
datagrams.
It is up to your application to detect lost packets or other problems
in communication.
I can't say for sure about OT on earlier versions of Mac OS, but on
Mac OS X, you will receive no indication of error, regardless of
whether the system runs out of buffers to hold your transmissions or
the driver can't send the frame (e.g., because of excess collisions).
Regards,
Justin
--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Help cure HTML Email
/ \
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
Regards,
Igor
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.