[Nice] Making sense of it all...
youness.alaoui at collabora.co.uk
Fri Aug 20 10:59:34 PDT 2010
On 08/20/2010 09:09 AM, Tony Di Croce wrote:
> >Yes, you also need to call nice_agent_get_local_credentials() to
> get your local
> >credentials (username/password) and call
> >after the remote user/pass gets exchanged.
> >And yeah, sorry, I forgot to add those to the example code.
> >Don't forget that you also need to call the
> nice_agent_attach_recv() method to
> >make sure you receive data (such as the STUN response in the
> candidate gathering
> >There are other things you might want to do, make sure you read the
> gtk-doc of
> >the library and understand what each method is and what it's meant for.
> What service are these credentials for? Does the Stun server need login
No, the credentials are for ICE itself, the two clients need to authenticate
each other in order for an ICE connection to be establish. This is to avoid
someone receiving the packets by mistake (the router routing to the wrong
computer) and 'hijacking' the connection.
> >> Now all I need to know is how you serialize whatever data is
> returned in
> >> that GSList*, so I can transmit it. :) I think I'm starting to
> get this...
> >well, the serialization, if I understand what you mean, is how you
> send the
> >candidates to the other side, right ?
> >In that case, that's not part of the ICE methodology.. you can
> 'serialize' the
> >candidates/user/pass any way you want.. one method is to put it in
> the SDP of a
> >SIP invite. You can also send it as an XML using Jingle's XEP over
> an XMPP
> >connection.. it really all depends on what protocol is being used
> to connect to
> >the server (SIP, XMPP, custom, other...). I'll let you decide on
> the best way to
> >do that.
> >But I'm curious, what is it exactly you're trying to achieve with
> libnice? What
> >application are you working on? and what protocol is being used
> behind it ?
> I looked into GSList a bit and found a singly linked structure with a
> "gpointer" member for the data. In this case, are these instances of the
> "NiceCandidate" struct being returned to me?
Yes, like the documentation says, it's a GSList of NiceCandidate.
> Right now I'm just in the research phase. My goal is a custom client &
> server that enables some remote administration features for my companies
> range of products... Of course, there are a million more ideas this enables!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 262 bytes
Desc: OpenPGP digital signature
More information about the Nice