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: Quinn <email@hidden>
- Date: Mon, 12 Jul 2004 15:32:31 +0100
At 0:00 +0400 1/7/04, Igor garnov wrote:
My Carbon CFM application uses Open Transport and works with
endpoints in asynchronous mode, installing a notifier routine.
Is this running on traditional Mac OS, or Mac OS X? The OT
implementations are quite different.
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?
You can't rely on getting the ICMP error packet. Many hosts will
send you an ICMP error if the UDP packet wasn't delivered, but other
hosts will ignore you. [Various sites on the Internet have taken to
swallowing ICMP packets, which is dumb, but there you go.] If your
machine does get the ICMP packet, OT will deliver it to you at a
T_UDERR. It will also deliver it to any other endpoint that's
listening for ICMP messages.
Should I call OTRcvUDErr before calling OTCloseProvider?
This should not be necessary.
After 5 seconds my timer fires and I call OTCloseProvider on the endpooint,
after which my application freezes.
Which sounds like a serious problem. This shouldn't happen. I'd
offer you some debugging hints, but they vary depending on what OS
you're running. If you can follow-up with some details, I can make
further suggestions.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.