[libnice] nice_agent_recv example
Youness Alaoui
kakaroto at kakaroto.homelinux.net
Fri Jul 4 01:21:09 PDT 2014
Hi,
I'm not sure how it works as I hadn't implemented that part, but I'm
guessing you need to call nice_agent_recv in order for it to receive the
stun messages and discover the server reflexive and peer reflexive
candidaets. I think you need to create a separate thread that will
continuously call the function or something like that. Maybe have a look at
how the GIO implementation works, it could give you ideas.
I hope this helps,
Youness.
On Mon, Jun 30, 2014 at 8:17 AM, Sudesh Kumar <sudeshbks at gmail.com> wrote:
> I have tried using the nice_agent_recv function in my code, but the
> problem is I have to use the peer reflexive candidate as my selected
> component. As per the function definition
>
> nice_agent_recv_messages must not be used in combination with
> nice_agent_attach_recv()
> <http://nice.freedesktop.org/libnice/NiceAgent.html#nice-agent-attach-recv> on
> the same stream/component pair.
>
> but I can get the peer reflexive candidates only if I attaches the stream's
> component's sockets to the Glib Mainloop Context using
> nice_agent_attach_recv()
> <http://nice.freedesktop.org/libnice/NiceAgent.html#nice-agent-attach-recv>
> before gathering the local candidates.
>
> Please help me in advance on how to use the nice_agent_recv() function.
>
> Thanks & Regards,
> Sudesh
>
>
> On Mon, Jun 23, 2014 at 7:12 PM, Sudesh Kumar <sudeshbks at gmail.com> wrote:
>
>> Hi,
>>
>> I am new to libnice and I am able to execute the examples provided in the
>> package. I can see the nice_agent_attach_recv function is used to read the
>> data from connected peer in all the examples and this is a callback
>> function.
>>
>> I want to use the nice_agent_recv function instead of
>> nice_agent_attach_recv, but I am unsure about how to use it.
>>
>> Can u please provide me a sample code(possibly editing in
>> simple-example.c) on how to use nice_agent_recv function.
>>
>> Thanks & Regards,
>> Sudesh
>>
>
>
> _______________________________________________
> 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/20140704/d37c1177/attachment.html>
More information about the nice
mailing list