[Nice] New API and refactor

Rémi Denis-Courmont remi.denis-courmont at nokia.com
Tue May 6 23:15:56 PDT 2008

Le Wednesday 07 May 2008 03:51:53 ext Youness Alaoui, vous avez écrit :
> As some of you know, I'm working on a refactor of libnice. I'm not sure
> yet whether the external API will change much or not, but the internal
> API and code needs major refactoring.
> The way I currently see it is : modular, layered, simple and beautiful!

The STUN stack already is a completely separate module. It just happens to be 
linked statically, but that is just a matter of changing stun/Makefile.am.

I've also already gone through a certain level of pain trying to layer it. 
Unfortunately, STUN is not completely clean-cut a protocol. But the real 
reason why I stopped in the middle: I don't know yet what TURN support will 
require from the STUN stack.

Anyway, it still is layered anyhow, so it'd help if you told what you 
considered was wrong with it?

> There are of course multiple angle at which we could start designing the
> code, I currently want to concentrate on the modularity of libnice,
> mainly, have the STUN part of it as a completely separate module.

We've also purposedly removed glib and most heap allocations from there, so 
that it can be used in non-glib projects, in real-time, and by freaks who 
want to avoid or otherwise catch memory allocation failures.

As for who "owns" the sockets, STUN or ICE. Again, I am not able to make a 
sane opinion until I know how TURN and ICE-TCP will work. And currently, 
nobody knows.

Rémi Denis-Courmont

More information about the Nice mailing list