[Nice] When can we send()?

Tony Di Croce dicroce at gmail.com
Mon Sep 27 12:02:35 PDT 2010


Ok, I know what to do when nice_agent_send() return less than the number of
bytes I've requested... But I'd like clarification on 1 thing... If it
returns -1, should I keep trying, or does that indicate something
unrecoverable has occurred?

     td


On Wed, Sep 1, 2010 at 12:19 PM, Youness Alaoui <
youness.alaoui at collabora.co.uk> wrote:

> Yeah, it's like any normal reliable socket, you only write stuff to do when
> it
> becomes 'writable'. Read the docs correctly, it will initially send you the
> writable signal when it's ready.. and after that, whenever you call send
> (), if
> it doesn't return '-1' OR a value less than what you asked it to write,
> then it
> will NOT send a new signal.. so you have to keep track of that.. as soon as
> you
> receive a reponse of -1 (or < len) then you must wait for the new writable
> signal.
>
> Youness.
>
> On 09/01/2010 12:04 PM, Tony Di Croce wrote:
> > Ah... I'm guessing I should be looking for
> > "reliable-transport-writable"... I'll try that...
> >
> >     td
> >
> > On Wed, Sep 1, 2010 at 9:01 AM, Tony Di Croce <dicroce at gmail.com
> > <mailto:dicroce at gmail.com>> wrote:
> >
> >     I have found that unless I sleep for 3 seconds after whichever agent
> >     is that last to reach NICE_COMPONENT_STATE_READY, my calls to
> >     nice_agent_send() will fail (return -1, btw, this is with a reliable
> >     agent, haven't tried it with unreliable)...
> >
> >     Is there some other event I should listening for or is this normal
> >     behaviour?
> >
> >         td
> >
> >
> >
> >
> > _______________________________________________
> > Nice mailing list
> > Nice at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/nice
>
>
>
> _______________________________________________
> Nice mailing list
> Nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20100927/d05ba6bd/attachment.htm>


More information about the Nice mailing list