<div dir="ltr"><blockquote>I think so -- you wont be told when the actual bytes have been pushed<br>
onto the network, nor when they have arrived succesfully at their<br>
destination. You have to add such logic yourself, maybe by having the<br>
recepient send back a confirmation.<br><br>
So one way to structure this is to let the code that calls<br>
transport.write return a Deferred, call it d. Before returning it, the<br>
code stores d in a well-known place, something like<br><br>
 &nbsp;transport.write(...)<br>
 &nbsp;d = Deferred()<br>
 &nbsp;outstanding requests[some_id] = d<br>
 &nbsp;return d<br><br>
The code that handles incoming data will then have to recognize the<br>
confirmation and will invoke the callback method on d:<br><br>
 &nbsp;def dataReceived(self, data):<br>
 &nbsp; &nbsp; &nbsp;id, payload = unpack(data)<br>
 &nbsp; &nbsp; &nbsp;d = outstanding_requests[id]<br>
 &nbsp; &nbsp; &nbsp;d.callback(payload)<br><br>
This is sort of how my code works in the VIFF project.<br><div class="Ih2E3d"><br>
&gt; By the way I did find your example, but I could not reconcile why<br>
&gt; some deferred examples had &#39;automatic&#39; callbacks and other fired<br>
&gt; their own.<br>
<br>
</div>That is because of the different ways they are used: Defered is the<br>
basic building block, but DeferredList combines several Deferreds into<br>
one.<br><br>Martin<br><br>Thankyou very much for your replies.<br><br>I have a feeling that I now know what I am doing or going to do.<br><br>I also think your min-deferred example will be very useful.<br><br>Thanks once again.<br>
<br>John Aherne<br><br></blockquote>






</div>