[Nice] a question on libnice
Youness Alaoui
youness.alaoui at collabora.co.uk
Wed Sep 26 10:15:02 PDT 2012
Hi,
Please use the mailing list for questions next time, this way, you could get
answers from others (in case I'm unavailable) and the responses you get might be
able to help others too. I've added the mailing list as CC.
The PseudoTcp class available in libnice can be used as is for your own reasons,
but if you plan on using it with an ICE connection then you don't need to do any
of that. You simply need to call nice_agent_new_reliable() instead of
nice_agent_new() and the new nice agent will automaticlaly use the pseudotcp
class internally to provide you with a reliable transport.
You will need to listen to the "reliable-transport-writable" signal in order to
determine if the pseudotcp is reliable. Please read this mail for more info on
how it should work
:http://lists.freedesktop.org/archives/nice/2012-September/000637.html
As for your listening tcp socket, I would suggest your application uses libnice
to connect through the NAT and connects to the TCP port locally using a normal
socket (on 127.0.0.1) and simply proxy data in/out from the local tcp socket to
the ice agent. It's the best way of doing it without porting your whole service
to using libnice.
I hope this helps.
Youness.
On 09/25/2012 07:27 PM, Zhenyu Yang wrote:
> Hi Youness,
>
> I am working on NAT-traversal issue and found your library of libnice a
> potential fit for the solution. I also follow the discussion archive and hope to
> get more help.
>
> I am looking at "PseudoTcp" and "test-pseudotcp.c", and feel puzzled how it is
> linked to the rest of Nice stuff. The only thing that indicates a connection is
> the "conversation" used in "pseudo_tcp_socket_new".
>
> So, I guess, one possibility is to launch pseudo tcp socket after ICE handshake
> is done.
>
> To be more specific, inside the callback of "new-selected-pair".
>
> Is that correct ?
>
>
> And another question...
>
> So far, we have a server listening at a tcp port. How this could be implemented
> through NAT under the libnice scheme?
>
>
> Thank you very much for the clarification and suggestion.
>
>
> Best regards,
>
> Igenyar
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120926/2a5d7304/attachment.pgp>
More information about the nice
mailing list