[Nice] minimal example

Youness Alaoui youness.alaoui at collabora.co.uk
Thu Jan 12 13:24:16 PST 2012


It's a question that I get often. I hope to get some time to write a proper
tutorial with some example code, in the meantime, I suggest reading old threads
on this mailing list.
Here is one thread specifically about starting with libnice which explains how
to do, what the usual bugs/misconceptions are and some sample code is also shared :
http://lists.freedesktop.org/archives/nice/2011-October/000442.html
http://lists.freedesktop.org/archives/nice/2011-October/000443.html
http://lists.freedesktop.org/archives/nice/2011-November/000449.html
http://lists.freedesktop.org/archives/nice/2011-November/000451.html
http://lists.freedesktop.org/archives/nice/2011-November/000456.html
http://lists.freedesktop.org/archives/nice/2011-November/000458.html
http://lists.freedesktop.org/archives/nice/2011-December/000467.html
http://lists.freedesktop.org/archives/nice/2011-December/000469.html

For some reason, the list archives doesn't save messages sent with the list as
CC instead of TO.. so I don't have the messages from Tiago, but you can read
them inlined in my own answers to him.
In one of his mails he sent a sample program which I've attached to this mail.
It's a bit more complex than a simple "libnice hello world", but it should give
you an idea on how to use the API in a real life example.

Let me know if you have any further questions.
Youness.

On 01/12/2012 11:49 AM, Eduardo Bezerra wrote:
> Oh and by the way, I've seen the NiceAgent api page... Although that helped a
> lot in understand what idiomatic libnice uses, it doesn't really establish any
> "connection"...
> 
> On Thu, Jan 12, 2012 at 5:47 PM, Eduardo Bezerra <kdubezerra at gmail.com
> <mailto:kdubezerra at gmail.com>> wrote:
> 
>     Hi, I've been studying libnice, and now also glib, since it's build on top
>     of it (it definitely feels much better than going with libevent, imho).
>     However, I still couldn't figure out what I have to do to make two peers
>     talk to each other.
> 
>     Could you guys provide some (link to a) few-lines, minimalistic example
>     application that traverses the nat with ice and then communicates with some
>     other endpoint? Maybe something like
>     this? http://content.gpwiki.org/index.php/SDL:Tutorial:Using_SDL_net
> 
>     Thanks a lot again!
> 
>     Eduardo
> 
> 
> 
> 
> _______________________________________________
> Nice mailing list
> Nice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nice

-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.c
Type: text/x-csrc
Size: 9629 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120112/081535fa/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120112/081535fa/attachment.pgp>


More information about the Nice mailing list