Re: Detecting Data has been Sent
Re: Detecting Data has been Sent
- Subject: Re: Detecting Data has been Sent
- From: Quinn <email@hidden>
- Date: Wed, 19 Feb 2003 09:52:21 +0000
At 20:33 +0000 18/2/03, Mark Thomas wrote:
Is it possible from a Notifer to tell if asynchronous OTSndUData has
successfully sent something which has left the machine.
No. In general, this is not possible. You seem to be off in the
weeds here, so here's some basic facts.
o By default, the OTSnd* functions make a copy of the buffer.
o You can alter this behaviour by using OTAckSends. In that case, OT
will send you T_MEMORYRELEASED event when it's done with your buffer.
o T_MEMORYRELEASED events are not generated unless OTAckSends is on.
o The OT compatibility library on Mac OS X does not have a useful
implementation of no-copy sends. If you turn on OTAckSends,
OT on X will just copy the buffer and immediately send you a
T_MEMORYRELEASED event. The reason for this is that the
underlying BSD subsystem does not support no-copy sends.
o You shouldn't use T_MEMORYRELEASED as a flow control mechanism.
IM:NWOT explicitly calls this out.
You should not wait for the T_MEMORYRELEASED event from a previous
send operation to trigger more sends. The exact time this event
occurs depends on how the underlying provider is implemented. It
might hold on to memory until the next send occurs, or behave in
some other way which causes it to delay releasing memory.
o The reason for the above is that, even when no-copy sends are in
operation, there's no guarantee that the TCP/IP stack won't, for its
own internal reasons, make a copy of the data before sending it,
or hold on to the data after it has sent it. Thus, the only
information you can infer from a T_MEMORYRELEASED event is that
the stack is done with your memory.
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.