<div>Ok, I know what to do when nice_agent_send() return less than the number of bytes I&#39;ve requested... But I&#39;d like clarification on 1 thing... If it returns -1, should I keep trying, or does that indicate something unrecoverable has occurred?<br>
<br></div><div>     td</div><div><br><br><div class="gmail_quote">On Wed, Sep 1, 2010 at 12:19 PM, Youness Alaoui <span dir="ltr">&lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yeah, it&#39;s like any normal reliable socket, you only write stuff to do when it<br>
becomes &#39;writable&#39;. Read the docs correctly, it will initially send you the<br>
writable signal when it&#39;s ready.. and after that, whenever you call send (), if<br>
it doesn&#39;t return &#39;-1&#39; OR a value less than what you asked it to write, then it<br>
will NOT send a new signal.. so you have to keep track of that.. as soon as you<br>
receive a reponse of -1 (or &lt; len) then you must wait for the new writable signal.<br>
<br>
Youness.<br>
<div class="im"><br>
On 09/01/2010 12:04 PM, Tony Di Croce wrote:<br>
&gt; Ah... I&#39;m guessing I should be looking for<br>
&gt; &quot;reliable-transport-writable&quot;... I&#39;ll try that...<br>
&gt;<br>
&gt;     td<br>
&gt;<br>
&gt; On Wed, Sep 1, 2010 at 9:01 AM, Tony Di Croce &lt;<a href="mailto:dicroce@gmail.com">dicroce@gmail.com</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:dicroce@gmail.com">dicroce@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     I have found that unless I sleep for 3 seconds after whichever agent<br>
&gt;     is that last to reach NICE_COMPONENT_STATE_READY, my calls to<br>
&gt;     nice_agent_send() will fail (return -1, btw, this is with a reliable<br>
&gt;     agent, haven&#39;t tried it with unreliable)...<br>
&gt;<br>
&gt;     Is there some other event I should listening for or is this normal<br>
&gt;     behaviour?<br>
&gt;<br>
&gt;         td<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; Nice mailing list<br>
&gt; <a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br>
<br>
<br>_______________________________________________<br>
Nice mailing list<br>
<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br></blockquote></div><br></div>