Hi Youness,<div><br></div><div>I have a simple question for you:</div><div>Is there any way to close the &quot;connection&quot; to the other agent? Let him know that you have terminated sending data?</div><div><br></div><div>

Just unrefing the agent doesn&#39;t work.</div><div><br></div><div>Thanks,</div><div>Tiago<br><br><div class="gmail_quote">On Fri, Dec 16, 2011 at 10:42 PM, Youness Alaoui <span dir="ltr">&lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/16/2011 06:41 AM, Tiago Sá wrote:<br>
&gt; Hi Youness,<br>
&gt;<br>
&gt; Sure! I will share the application when I succeed.<br>
</div>cool :)<br>
<div class="im"><br>
&gt; Before trying to pipe from a local socket I am simply testing reading from a<br>
&gt; file and sending that data to the other agent.<br>
&gt; I am using nice_agent_new_reliable and pseudo_tcp is opened:<br>
&gt; &quot;(process:11881): libnice-DEBUG: Agent 0xb97de0: s1:1 pseudo Tcp socket Opened&quot;<br>
&gt; Can I assume that Nice will manage the acknowledgments, sequencing and all that<br>
&gt; TCP stuff?<br>
</div>Yes, libnice will handle all of that, you still use the libnice API the same<br>
way, *but* there is a small difference between a normal agent and a reliable<br>
agent. I will explain it below.<br>
<div><div class="h5"><br>
&gt;<br>
&gt; This is the function I use to slice and send the file:<br>
&gt;<br>
&gt; int send_file(char *filename){<br>
&gt;         FILE *file = fopen(filename, &quot;rb&quot;);<br>
&gt;         char *file_chunk = malloc(CHUNK_SIZE);<br>
&gt;<br>
&gt;         size_t nbytes = 0;<br>
&gt;         int sent=0;<br>
&gt;         while ( (nbytes = fread(file_chunk, sizeof(char), CHUNK_SIZE,file)) &gt; 0)<br>
&gt;         {<br>
&gt;                 int offset = 0;<br>
&gt;                 while (((sent =<br>
&gt; nice_agent_send(agent,stream_id,NICE_COMPONENT_TYPE_RTP,nbytes,fi<br>
&gt; le_chunk+offset)) &gt; 0) || (sent == -1 &amp;&amp; errno == EINTR) ) {<br>
&gt;                         if (sent &gt; 0) {<br>
&gt;                                 printf(&quot;SENT FILE: chunk size: %zu send result:<br>
&gt; %d \n&quot;,nbytes,sent);<br>
&gt;                                 offset += sent;<br>
&gt;                                 nbytes -= sent;<br>
&gt;                         }<br>
&gt;                 }<br>
&gt;         }<br>
&gt;         return 0;<br>
&gt; }<br>
&gt;<br>
&gt; And the callback to receive:<br>
&gt;<br>
&gt; void<br>
&gt; cb_nice_recv (NiceAgent * agent, guint stream_id, guint component_id,<br>
&gt;               guint len, gchar * buf, gpointer user_data)<br>
&gt; {<br>
&gt;   FILE *file_received=fopen(&quot;testFile-received.txt&quot;, &quot;ab&quot;);<br>
&gt;<br>
&gt;   if(file_received){<br>
&gt;       int writen = fwrite(buf,sizeof(char),len,file_received);<br>
&gt;      printf(&quot;RECEIVED FILE: buf size: %d , writen size: %d\n\n&quot;,len,writen);<br>
&gt;   }<br>
&gt;   else{ perror(&quot;ERROR OPENING FILE\n&quot;); }<br>
&gt; }<br>
&gt;<br>
&gt; It sends some chunks and then starts to fail on send.<br>
&gt;<br>
&gt; Problably I should use the &quot;reliable-transport-writable&quot; signal, to wait before<br>
&gt; trying to send a new chunk, but then, the signal must be handled by a different<br>
&gt; callback, am I write? Or can I &quot;wait&quot; for the signal on the same send_file function?<br>
<br>
</div></div>The read callback is fine, although you should remember to fclose the file...<br>
As for the sending, you&#39;re not waiting for it to be writable. I don&#39;t think that<br>
&#39;errno&#39; has any meaning either in the world of libnice...<br>
<br>
The way you should do it is to send data using a callback function that you hook<br>
into the reliable-transport-writable signal. That signal will be sent when you<br>
first connect (so you don&#39;t need to listen for state changes actually), and then<br>
it will only be sent if the nice_agent_send returns less bytes than you tried to<br>
send or if it returns -1.<br>
Don&#39;t forget that if you call nice_agent_send, and it returns the right number<br>
of bytes sent, then the writable signal will not be emitted.. the emission of<br>
the signal is only enabled IF the last operation of the nice_agent_send was that<br>
it couldn&#39;t send the full buffer you gave it..<br>
<br>
So here&#39;s a quick pseudocode to illustrate how you should do it :<br>
void<br>
writable_cb (NiceAgent *agent, guint sid, guint cid, gpointer data)<br>
{<br>
  FILE *file = data;<br>
<div class="im">  char *file_chunk = malloc(CHUNK_SIZE);<br>
  size_t nbytes = 0;<br>
  int sent=0;<br>
<br>
</div>  while ( (nbytes = fread(file_chunk, sizeof(char), CHUNK_SIZE, file)) &gt; 0)<br>
  {<br>
      int offset = 0;<br>
      sent = nice_agent_send(agent,stream_id, NICE_COMPONENT_TYPE_RTP,<br>
              nbytes,file_chunk);<br>
      if (sent &lt; nbytes) {<br>
           /* If return value is -1 it means nothing was sent */<br>
           if (sent == -1)<br>
              sent = 0;<br>
           /* seek back to the last byte that was actually sent, so it gets<br>
              read on the next pass */<br>
           fseek (file, nbytes - seek, SEEK_CURRENT);<br>
<br>
           /* break and exit the function, wait for the next signal callback<br>
              to continue sending the rest of the data */<br>
           break;<br>
      }<br>
  }<br>
}<br>
<br>
main() {<br>
<br>
  FILE* fd = fopen(&quot;some_file.txt&quot;, &quot;rb&quot;);<br>
<br>
  agent = nice_agent_reliable_new();<br>
  g_signal_connect(agent, &quot;reliable-transport-writable&quot;, writable_cb, fd);<br>
<br>
}<br>
<br>
<br>
This should be enough to give you an idea on what needs to be done.<br>
Hope it helps!<br>
<br>
Youness.<br>
<div class="im"><br>
&gt;<br>
&gt; Thank you for the helpful information you are sharing.<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Tiago Sá<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Dec 12, 2011 at 11:39 PM, Youness Alaoui &lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
</div><div><div class="h5">&gt; &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     On 12/12/2011 06:20 AM, Tiago Sá wrote:<br>
&gt;     &gt; Hi again Youness,<br>
&gt;     Hi again Tiago,<br>
&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; my application is progressing in small steps.<br>
&gt;     &gt; We chose to use XMPP for the communication. We are using libstrophe, it lacks<br>
&gt;     &gt; some documentation, but was enough for our needs.<br>
&gt;     &gt; We implemented a naif handshake, life the one you mentioned above, by<br>
&gt;     exchanging<br>
&gt;     &gt; some xmpp message stanzas.<br>
&gt;<br>
&gt;     Cool, you may want to look at the jingle XEP to see how candidates are being<br>
&gt;     transferred in a VoIP call.<br>
&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; This application will be part of a research project involving the grid,<br>
&gt;     where we<br>
&gt;     &gt; need private hosts (called agents) to be able to communicate someway. We will<br>
&gt;     &gt; implement that (inter-agent) communication protocol later, right now we are<br>
&gt;     &gt; concerned with the NAT traversal thing, and it seems to be working fine :)<br>
&gt;     &gt;<br>
&gt;     &gt; Now, I would like to ask you a final question:<br>
&gt;     &gt; Right now we are able to send strings using &quot;nice_agent_send&quot;. We would<br>
&gt;     like to<br>
&gt;     &gt; establish a socket between the hosts and use other common primitives to<br>
&gt;     code our<br>
&gt;     &gt; application.<br>
&gt;     &gt; Maybe the best possibility would be to create some kind of pipe from an<br>
&gt;     &gt; &quot;external&quot; application using local ports (something<br>
&gt;     &gt; like <a href="http://code.google.com/p/gnat/" target="_blank">http://code.google.com/p/gnat/</a>)<br>
&gt;     &gt; Or, in a simpler way, just pipe stdin/stdout from another app, slice that data<br>
&gt;     &gt; and send it using libnice send primitive?<br>
&gt;     &gt;<br>
&gt;     &gt; Have you ever tried something like this?<br>
&gt;     I have not tried something like that, but it shouldn&#39;t be too hard in my<br>
&gt;     opinion. You could just create a local daemon that connects to the XMPP server,<br>
&gt;     and when it gets a new local connection, it sends candidates and acts as a proxy<br>
</div></div>&gt;     between the <a href="http://127.0.0.1:12345" target="_blank">127.0.0.1:12345</a> &lt;<a href="http://127.0.0.1:12345" target="_blank">http://127.0.0.1:12345</a>&gt; socket and the remote<br>
<div class="im HOEnZb">&gt;     socket with the<br>
&gt;     nice_agent_send and the recv callback.<br>
&gt;     Would be nice if that code gets shared if you ever get to do it. But I don&#39;t see<br>
&gt;     anything that would prevent it from working.<br>
&gt;     Good luck!<br>
&gt;     &gt;<br>
&gt;     &gt; Thank you very much for your help.<br>
&gt;     &gt;<br>
&gt;     &gt; Cheers,<br>
&gt;     &gt; Tiago<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; On Mon, Nov 28, 2011 at 12:46 PM, Youness Alaoui<br>
&gt;     &lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a> &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
</div><div class="im HOEnZb">&gt;     &gt; &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt; wrote:<br>
&gt;     &gt;<br>
</div><div class="HOEnZb"><div class="h5">&gt;     &gt;     On 11/23/2011 01:14 PM, Tiago Sá wrote:<br>
&gt;     &gt;     &gt; Hi Youness,<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; thank you for your suggestions.<br>
&gt;     &gt;     &gt; You&#39;r right, the STUN/TURN server I was using had a connection limit. I<br>
&gt;     &gt;     &gt; installed the <a href="http://turnserver.org" target="_blank">turnserver.org</a> &lt;<a href="http://turnserver.org" target="_blank">http://turnserver.org</a>&gt;<br>
&gt;     &lt;<a href="http://turnserver.org" target="_blank">http://turnserver.org</a>&gt;<br>
&gt;     &gt;     &lt;<a href="http://turnserver.org" target="_blank">http://turnserver.org</a>&gt; one in a public addressed<br>
&gt;     &gt;     &gt; machine.<br>
&gt;     &gt;     &gt; I also changed the way how I was writing the candidates, setting those<br>
&gt;     &gt;     pointers<br>
&gt;     &gt;     &gt; to NULL.<br>
&gt;     &gt;     &gt; ICE seems to be working properly now! :)<br>
&gt;     &gt;     Glad it worked :)<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; I have a question:<br>
&gt;     &gt;     &gt; According to the example in<br>
&gt;     <a href="http://nice.freedesktop.org/libnice/NiceAgent.html" target="_blank">http://nice.freedesktop.org/libnice/NiceAgent.html</a><br>
&gt;     &gt;     &gt; we should be able to start sending messages after the signal<br>
&gt;     new-selected-pair<br>
&gt;     &gt;     &gt; is fired. However, I tried it but no success:<br>
&gt;     &gt;     &gt; void<br>
&gt;     &gt;     &gt; cb_new_selected_pair (void)<br>
&gt;     &gt;     &gt; {<br>
&gt;     &gt;     &gt;   printf (&quot;cb_new_selected_pair\n&quot;);<br>
&gt;     &gt;     &gt;   nice_agent_send(agent, stream_id, NICE_COMPONENT_TYPE_RTP,<br>
&gt;     &gt;     strlen(&quot;Ola&quot;),&quot;Ola&quot;);<br>
&gt;     &gt;     &gt; }<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; That first message is never received. However, after &quot;a while&quot; I try<br>
&gt;     to send<br>
&gt;     &gt;     &gt; again and it works. Do I have to wait for the other agent to be ready to<br>
&gt;     &gt;     receive?<br>
&gt;     &gt;     Humm.. that might not have been entirely true.. technically if there is a<br>
&gt;     &gt;     selected pair, then it should work, unless you are ready locally, but<br>
&gt;     the remote<br>
&gt;     &gt;     isn&#39;t ready to receive yet. technically you should wait for the state<br>
&gt;     to go to<br>
&gt;     &gt;     READY... and not care about the selected pair.. the docs might be<br>
&gt;     wrong there,<br>
&gt;     &gt;     but it&#39;s been a while and I&#39;m not entirely sure of the use case that<br>
&gt;     would make<br>
&gt;     &gt;     it fail (but in every other project, we use the READY state as an<br>
&gt;     indication<br>
&gt;     &gt;     that we&#39;re ready to send).<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Well, this is a checkpoint for me, but I must ask for another<br>
&gt;     suggestion now.<br>
&gt;     &gt;     &gt; I need to improve the way how the communication between agents is made<br>
&gt;     &gt;     &gt; (exchanging candidates/credentials, initiating p2p connections, etc...)<br>
&gt;     &gt;     &gt; As I read in this<br>
&gt;     &gt;     &gt; thread<br>
&gt;     <a href="http://lists.freedesktop.org/archives/nice/2010-August/000330.html" target="_blank">http://lists.freedesktop.org/archives/nice/2010-August/000330.html</a><br>
&gt;     &gt;     , you<br>
&gt;     &gt;     &gt; wrote:<br>
&gt;     &gt;     &gt; &quot;well, the serialization, if I understand what you mean, is how you<br>
&gt;     send the<br>
&gt;     &gt;     &gt; candidates to the other side, right ? In that case, that&#39;s not part<br>
&gt;     of the ICE<br>
&gt;     &gt;     &gt; methodology.. you can &#39;serialize&#39; the candidates/user/pass any way<br>
&gt;     you want..<br>
&gt;     &gt;     &gt; one method is to put it in the SDP of a SIP invite. You can also<br>
&gt;     send it as an<br>
&gt;     &gt;     &gt; XML using Jingle&#39;s XEP over an XMPP connection.. it really all<br>
&gt;     depends on what<br>
&gt;     &gt;     &gt; protocol is being used to connect to the server (SIP, XMPP, custom,<br>
&gt;     other...).<br>
&gt;     &gt;     &gt; I&#39;ll let you decide on the best way to do that.&quot;<br>
&gt;     &gt;     Thanks for searching in the archives :)<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; After doing some research, I feel a bit scared. That is a completely<br>
&gt;     new world<br>
&gt;     &gt;     &gt; for me. Could you please point the &quot;simplest and most feasible&quot;<br>
&gt;     solution for<br>
&gt;     &gt;     &gt; this problem? Should I choose SIP or XMPP?<br>
&gt;     &gt;     &gt; libjingle, for example, presents a huge API...<br>
&gt;     &gt;     &gt; Do you know any simple client, possibly allowing me to connect to an<br>
&gt;     existing<br>
&gt;     &gt;     &gt; infrastructure (such as Google Talk), I could use for this trivial<br>
&gt;     information<br>
&gt;     &gt;     &gt; exchange?<br>
&gt;     &gt;<br>
&gt;     &gt;     Humm.. yes, libjingle is a big pile of **** :) my suggestion is to<br>
&gt;     never use it!<br>
&gt;     &gt;     The real question here is what do you need libnice for? what will the<br>
&gt;     clients be<br>
&gt;     &gt;     ? if it&#39;s for a game or some custom application and that you can<br>
&gt;     control the<br>
&gt;     &gt;     server and the client, then you can setup something custom. If you<br>
&gt;     want to have<br>
&gt;     &gt;     a list of contacts in your application and the user can just select<br>
&gt;     one and it<br>
&gt;     &gt;     will know what to do, then using XMPP might be the best solution. It<br>
&gt;     really all<br>
&gt;     &gt;     depends on your needs and capabilities.. you can decide all about it,<br>
&gt;     but here&#39;s<br>
&gt;     &gt;     a simple example if you want :<br>
&gt;     &gt;     client sending to server is : ---&gt;<br>
&gt;     &gt;     client receiving from server is : &lt;-----<br>
&gt;     &gt;     Comments are preceded with #<br>
&gt;     &gt;     ----&gt; HELLO<br>
&gt;     &gt;     &lt;---- HELLO 12345 # Where 12345 would be a random id that gets<br>
&gt;     assigned to you<br>
&gt;     &gt;     ----&gt; 54321 BEGIN ICE # first number being the &#39;random id&#39; of the<br>
&gt;     destination<br>
&gt;     &gt;     ----&gt; 54321 ICE-CREDENTIALS &lt;the_username&gt; &lt;the_password&gt;<br>
&gt;     &gt;     ----&gt; 54321 CANDIDATE 1 UDP 192.168.1.100 43132 host<br>
&gt;     &gt;     ----&gt; 54321 CANDIDATE 2 UDP 1.2.3.4 52133 srv-reflx<br>
&gt;     &gt;     ----&gt; 54321 ICE DONE # To say you&#39;re done, you can send it to the peer<br>
&gt;     &gt;     &lt;---- 54321 ICE REPLY<br>
&gt;     &gt;     &lt;---- 54321 ICE-CREDENTIALS foo bar # the remote&#39;s credentials<br>
&gt;     &gt;     &lt;---- 54321 CANDIDATE 1 UDP  192.168.1.200 54521 host<br>
&gt;     &gt;     &lt;---- 54321 CANDIDATE 2 UDP 1.2.4.1 9614 srv-reflx<br>
&gt;     &gt;     &lt;---- 54321 CANDIDATE 3 UDP <a href="tel:4.3.2.1%2032957" value="+351432132957">4.3.2.1 32957</a> &lt;tel:4.3.2.1%2032957&gt;<br>
&gt;     &lt;tel:4.3.2.1%2032957&gt; relay-reflx<br>
&gt;     &gt;     &lt;---- 54321 ICE DONE<br>
&gt;     &gt;     [...]<br>
&gt;     &gt;     ----&gt; 54321 ICE DESTROY<br>
&gt;     &gt;<br>
&gt;     &gt;     And your server just maps sockets with those random ids, and relays<br>
&gt;     the data<br>
&gt;     &gt;     from one socket to another. And you parse the received input and build<br>
&gt;     your<br>
&gt;     &gt;     candidates...<br>
&gt;     &gt;     So this is a very simple, but of course inefficient, you get a random id<br>
&gt;     &gt;     everytime, it&#39;s hard to improve the protocol, etc... so using XMPP<br>
&gt;     would be<br>
&gt;     &gt;     better, but if you really don&#39;t need that much, then this might be the<br>
&gt;     solution<br>
&gt;     &gt;     you want.. like I said, it really depends on what you need it for.<br>
&gt;     &gt;     As for XMPP, you can look at the &#39;wocky&#39; library<br>
&gt;     &gt;     (<a href="http://cgit.freedesktop.org/wocky/" target="_blank">http://cgit.freedesktop.org/wocky/</a>)<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Thank you for your help.<br>
&gt;     &gt;     You&#39;re welcome :)<br>
&gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; Regards,<br>
&gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; On Thu, Nov 17, 2011 at 9:42 PM, Youness Alaoui<br>
&gt;     &gt;     &lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a> &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt;     &gt;     &gt; &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;&gt; wrote:<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     On 11/16/2011 08:30 PM, Tiago Sá wrote:<br>
&gt;     &gt;     &gt;     &gt; Hi again Youness,<br>
&gt;     &gt;     &gt;     &gt; thanks a lot for your help.<br>
&gt;     &gt;     &gt;     &gt; I believe I solved the problems you pointed before.<br>
&gt;     &gt;     &gt;     &gt; I am using a dumb method to exchange candidates. I write them to<br>
&gt;     &gt;     file and<br>
&gt;     &gt;     &gt;     &gt; exchange them using a ftp server (I will improve it later).<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; So, the way I run it is:<br>
&gt;     &gt;     &gt;     &gt; (HostA) ./client l<br>
&gt;     &gt;     &gt;     &gt; (HostB) ./client r<br>
&gt;     &gt;     &gt;     &gt; //local candidates are gathered and written to file<br>
&gt;     &gt;     &gt;     &gt; (HostA) put leftCands.bin on FTP and get rightCands.bin<br>
&gt;     &gt;     &gt;     &gt; (HostB) put rightCands.bin on FTP and get leftCands.bin<br>
&gt;     &gt;     &gt;     &gt; //read local credentials and write them on the remote host<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; I am using a relay server, that should work as a last resort. But<br>
&gt;     &gt;     during the<br>
&gt;     &gt;     &gt;     &gt; local candidate gathering, sometimes it gets a relayed candidate,<br>
&gt;     &gt;     but most of<br>
&gt;     &gt;     &gt;     &gt; the times it doesn&#39;t. Can it be related with timeouts?<br>
&gt;     &gt;     &gt;     It&#39;s possible the timeouts are affecting it, but I doubt it, usually<br>
&gt;     &gt;     the RTT<br>
&gt;     &gt;     &gt;     would be 200ms, but if you don&#39;t get a response from the relay<br>
&gt;     or the stun<br>
&gt;     &gt;     &gt;     server, it will retry 4 times until it times out after about 3<br>
&gt;     seconds.<br>
&gt;     &gt;     &gt;     It&#39;s possible though that the server has a limit on the number of<br>
&gt;     &gt;     allocations<br>
&gt;     &gt;     &gt;     you can create (probably 5) and if you are testing your app and it<br>
&gt;     &gt;     creates 2<br>
&gt;     &gt;     &gt;     allocations each time (one for each side), then it&#39;s possible the<br>
&gt;     &gt;     server starts<br>
&gt;     &gt;     &gt;     rejecting your allocation requests (each time you want to use<br>
&gt;     TURN, it<br>
&gt;     &gt;     will ask<br>
&gt;     &gt;     &gt;     the server to allocate a port for you for that specific<br>
&gt;     connection, so<br>
&gt;     &gt;     you have<br>
&gt;     &gt;     &gt;     the same settings but one port for each stream/component).<br>
&gt;     &gt;     &gt;     If that&#39;s the case, maybe that&#39;s why it sometimes works (when the<br>
&gt;     &gt;     allocation<br>
&gt;     &gt;     &gt;     times out from the server). libnice should technically<br>
&gt;     deallocate when the<br>
&gt;     &gt;     &gt;     stream is destroyed, so maybe catch your Ctrl-C and do an unref<br>
&gt;     on the<br>
&gt;     &gt;     agent<br>
&gt;     &gt;     &gt;     before returning from the main.<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; Either way, it can never get a pair a establish a connection. :(<br>
&gt;     &gt;     &gt;     &gt; I don&#39;t have a clue why this happens..<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     A log + wireshark dump might be helpful in this case. You can enable<br>
&gt;     &gt;     logging<br>
&gt;     &gt;     &gt;     with :<br>
&gt;     &gt;     &gt;     export NICE_DEBUG=all<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; Can you please have a look?<br>
&gt;     &gt;     &gt;     The code looks sane enough.. apart from the obvious method of<br>
&gt;     exchanging<br>
&gt;     &gt;     &gt;     candidates which isn&#39;t &quot;optimal&quot;. One thing I noticed though,<br>
&gt;     you just<br>
&gt;     &gt;     fwrite<br>
&gt;     &gt;     &gt;     the whole structure, but note that there are pointers in the<br>
&gt;     structure<br>
&gt;     &gt;     that will<br>
&gt;     &gt;     &gt;     be written as is to the file, and not their content. I&#39;m thinking of<br>
&gt;     &gt;     &gt;     username+password (but those should be NULL if you use the RFC5245<br>
&gt;     &gt;     compatibility<br>
&gt;     &gt;     &gt;     mode) but mostly the turn structure (which is just for local<br>
&gt;     &gt;     candidates and<br>
&gt;     &gt;     &gt;     wouldn&#39;t be used anyways for remote ones, but it&#39;s best to set it to<br>
&gt;     &gt;     NULL to<br>
&gt;     &gt;     &gt;     avoid possible crashes).<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; Cheers,<br>
&gt;     &gt;     &gt;     &gt; Tiago<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; On Fri, Nov 4, 2011 at 2:03 PM, Youness Alaoui<br>
&gt;     &gt;     &gt;     &lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a> &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt;     &gt;     &gt;     &gt; &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     Hi again Tiago,<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     For the remote candidates, you will need a third party<br>
&gt;     server to<br>
&gt;     &gt;     &gt;     exchange that<br>
&gt;     &gt;     &gt;     &gt;     information, usually the candidates would be sent over SIP or<br>
&gt;     &gt;     XMPP for<br>
&gt;     &gt;     &gt;     example.<br>
&gt;     &gt;     &gt;     &gt;     ICE cannot work if you don&#39;t have a third party server with<br>
&gt;     &gt;     which you can<br>
&gt;     &gt;     &gt;     &gt;     reliably exchange candidates. For testing purposes you<br>
&gt;     could have it<br>
&gt;     &gt;     &gt;     print the<br>
&gt;     &gt;     &gt;     &gt;     candidates to stdout, and you could copy/paste that into stdin<br>
&gt;     &gt;     of the<br>
&gt;     &gt;     &gt;     other<br>
&gt;     &gt;     &gt;     &gt;     instance and have it parse the input.. or you could hardcode a<br>
&gt;     &gt;     port to<br>
&gt;     &gt;     &gt;     connect<br>
&gt;     &gt;     &gt;     &gt;     to and do the candidate exchange.. there&#39;s no easy way of<br>
&gt;     doing that<br>
&gt;     &gt;     &gt;     though.<br>
&gt;     &gt;     &gt;     &gt;     You cannot hardcode the candidates because the port used<br>
&gt;     will be<br>
&gt;     &gt;     random<br>
&gt;     &gt;     &gt;     &gt;     everytime, also, you will need to exchange the randomly<br>
&gt;     generated<br>
&gt;     &gt;     &gt;     &gt;     username/password (nice_agent_get_local_credentials +<br>
&gt;     &gt;     &gt;     &gt;     nice_agent_set_remote_credentials) to make the connectivity<br>
&gt;     &gt;     checks work.<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     As for your example, here are a few comments :<br>
&gt;     &gt;     &gt;     &gt;     1 - you call the nice_agent_set_relay_info with stream_id<br>
&gt;     being<br>
&gt;     &gt;     &gt;     uninitialized,<br>
&gt;     &gt;     &gt;     &gt;     you must call it *after* you do the nice_agent_add_stream...<br>
&gt;     &gt;     &gt;     &gt;     2 - you don&#39;t need those GValues, you can just do<br>
&gt;     &gt;     &gt;     &gt;      g_object_set (G_OBJECT(agent),<br>
&gt;     &gt;     &gt;     &gt;                    &quot;stun-server&quot;, &quot;66.228.45.110&quot;,<br>
&gt;     &gt;     &gt;     &gt;                    &quot;stun-server-port&quot;, 3478,<br>
&gt;     &gt;     &gt;     &gt;                     NULL);<br>
&gt;     &gt;     &gt;     &gt;     3 - You shouldn&#39;t set the remote credentials as the same<br>
&gt;     as the<br>
&gt;     &gt;     local ones<br>
&gt;     &gt;     &gt;     &gt;     4 - In your print_candidate_info, you may also want to<br>
&gt;     print the<br>
&gt;     &gt;     port<br>
&gt;     &gt;     &gt;     used.<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     I hope this helps, let me know if you have further questions.<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     Youness.<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     On 11/03/2011 12:57 PM, Tiago Sá wrote:<br>
&gt;     &gt;     &gt;     &gt;     &gt; Hi Youness,<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; I have been trying to create a simple application based<br>
&gt;     on the<br>
&gt;     &gt;     first<br>
&gt;     &gt;     &gt;     link you<br>
&gt;     &gt;     &gt;     &gt;     &gt; pointed before.<br>
&gt;     &gt;     &gt;     &gt;     &gt; Thanks for the tips you gave me. I have a couple of<br>
&gt;     questions<br>
&gt;     &gt;     though, if<br>
&gt;     &gt;     &gt;     &gt;     you can<br>
&gt;     &gt;     &gt;     &gt;     &gt; help me.<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; I need to find a way to get the remote candidates passed<br>
&gt;     from<br>
&gt;     &gt;     a peer to<br>
&gt;     &gt;     &gt;     &gt;     another.<br>
&gt;     &gt;     &gt;     &gt;     &gt; Can you point an easy way to do that?<br>
&gt;     &gt;     &gt;     &gt;     &gt; Could I hardcode the remote candidates list, for testing<br>
&gt;     purposes?<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; Right now, I only get two local candidates (HOST and<br>
&gt;     &gt;     SERVER_REFLEXIVE).<br>
&gt;     &gt;     &gt;     &gt;     &gt; I am trying to use the numb TURN server, shouldn&#39;t I get<br>
&gt;     a RELAYED<br>
&gt;     &gt;     &gt;     &gt;     candidate too?<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; I am attaching the code. Can you please have a look at the<br>
&gt;     &gt;     code and<br>
&gt;     &gt;     &gt;     check<br>
&gt;     &gt;     &gt;     &gt;     where<br>
&gt;     &gt;     &gt;     &gt;     &gt; the error could be?<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; Thanks for helping!<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; Regards,<br>
&gt;     &gt;     &gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; On Wed, Oct 19, 2011 at 10:53 PM, Youness Alaoui<br>
&gt;     &gt;     &gt;     &gt;     &lt;<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a><br>
&gt;     &lt;mailto:<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Hi,<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Welcome to the world of libnice :)<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Yes, doing NAT traversal is far from being easy, the<br>
&gt;     only<br>
&gt;     &gt;     &gt;     solution is<br>
&gt;     &gt;     &gt;     &gt;     pretty<br>
&gt;     &gt;     &gt;     &gt;     &gt;     much to use the ICE specification and that&#39;s not easy to<br>
&gt;     &gt;     &gt;     implement, so<br>
&gt;     &gt;     &gt;     &gt;     that&#39;s<br>
&gt;     &gt;     &gt;     &gt;     &gt;     why you&#39;d need to use libnice.<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     For an example, you can have a look at the unit<br>
&gt;     tests, like<br>
&gt;     &gt;     &gt;     &gt;     &gt;     tests/test-fullmode.c for example, although that<br>
&gt;     does a lot of<br>
&gt;     &gt;     &gt;     stuff.<br>
&gt;     &gt;     &gt;     &gt;     You can<br>
&gt;     &gt;     &gt;     &gt;     &gt;     see a quick example  in the documentation for<br>
&gt;     NiceAgent :<br>
&gt;     &gt;     &gt;     &gt;     &gt;     <a href="http://nice.freedesktop.org/libnice/NiceAgent.html" target="_blank">http://nice.freedesktop.org/libnice/NiceAgent.html</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     For smaller examples, you can look at the libnice<br>
&gt;     mailing list<br>
&gt;     &gt;     &gt;     &gt;     archives, some<br>
&gt;     &gt;     &gt;     &gt;     &gt;     people posted their example code where they were having<br>
&gt;     &gt;     &gt;     problems. For<br>
&gt;     &gt;     &gt;     &gt;     example, a<br>
&gt;     &gt;     &gt;     &gt;     &gt;     very simple example can be seen here :<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     <a href="http://lists.freedesktop.org/archives/nice/2011-January/000404.html" target="_blank">http://lists.freedesktop.org/archives/nice/2011-January/000404.html</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;     But make sure to click on the &quot;Next message&quot; to read<br>
&gt;     the whole<br>
&gt;     &gt;     &gt;     thread<br>
&gt;     &gt;     &gt;     &gt;     because<br>
&gt;     &gt;     &gt;     &gt;     &gt;     that example had a bug that I explained how to fix<br>
&gt;     in the<br>
&gt;     &gt;     following<br>
&gt;     &gt;     &gt;     &gt;     emails.<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Same for this thread :<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     <a href="http://lists.freedesktop.org/archives/nice/2011-October/000434.html" target="_blank">http://lists.freedesktop.org/archives/nice/2011-October/000434.html</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     I hope that helps,<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Youness.<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     On 10/19/2011 09:58 AM, Tiago Sá wrote:<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Hi all,<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; my name is Tiago Sá, I am a junior researcher from<br>
&gt;     Portugal<br>
&gt;     &gt;     &gt;     and this<br>
&gt;     &gt;     &gt;     &gt;     is my<br>
&gt;     &gt;     &gt;     &gt;     &gt;     first<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; mail to this list.<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; I have a NAT traversal problem to solve and I have<br>
&gt;     been<br>
&gt;     &gt;     &gt;     looking for<br>
&gt;     &gt;     &gt;     &gt;     a solution<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; during the last weeks, which, as I found out, is<br>
&gt;     not so<br>
&gt;     &gt;     &gt;     trivial as I<br>
&gt;     &gt;     &gt;     &gt;     &gt;     thought before.<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; As stated on the libnice homepage, libnice seems to be<br>
&gt;     &gt;     what I am<br>
&gt;     &gt;     &gt;     &gt;     looking for:<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;     &quot;ICE is useful for applications that want to<br>
&gt;     establish<br>
&gt;     &gt;     &gt;     peer-to-peer<br>
&gt;     &gt;     &gt;     &gt;     &gt;     UDP data<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;     streams. It automates the process of<br>
&gt;     traversing NATs and<br>
&gt;     &gt;     &gt;     &gt;     provides security<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;     against some attacks. It also allows<br>
&gt;     applications to<br>
&gt;     &gt;     &gt;     create reliable<br>
&gt;     &gt;     &gt;     &gt;     &gt;     streams<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;     using a TCP over UDP layer.&quot;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; I have been looking for the provided documentation<br>
&gt;     and I am<br>
&gt;     &gt;     &gt;     feeling kind<br>
&gt;     &gt;     &gt;     &gt;     &gt;     of lost.<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Is there any example application or tutorial to<br>
&gt;     get started?<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Could you please share a basic application of this<br>
&gt;     kind or<br>
&gt;     &gt;     &gt;     point me a<br>
&gt;     &gt;     &gt;     &gt;     &gt;     direction?<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Thanks in advance for your help.<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Regards,<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; --<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Universidade do Minho, Braga - Portugal<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;  <a href="http://about.me/tiagosa/" target="_blank">http://about.me/tiagosa/</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; _______________________________________________<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; Nice mailing list<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; <a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     &gt; <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     _______________________________________________<br>
&gt;     &gt;     &gt;     &gt;     &gt;     Nice mailing list<br>
&gt;     &gt;     &gt;     &gt;     &gt;     <a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt; &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a><br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;<br>
&gt;     &gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;<br>
&gt;     &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a> &lt;mailto:<a href="mailto:Nice@lists.freedesktop.org">Nice@lists.freedesktop.org</a>&gt;&gt;&gt;&gt;&gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;     <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt; --<br>
&gt;     &gt;     &gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;     &gt;     &gt; Universidade do Minho, Braga - Portugal<br>
&gt;     &gt;     &gt;     &gt;     &gt;  <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a> &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt; &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;     &gt; --<br>
&gt;     &gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt;     &gt; Universidade do Minho, Braga - Portugal<br>
&gt;     &gt;     &gt;     &gt;  <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a> &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt; &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;     &gt; --<br>
&gt;     &gt;     &gt; Tiago Sá<br>
&gt;     &gt;     &gt; Universidade do Minho, Braga - Portugal<br>
&gt;     &gt;     &gt;  <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a> &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt; &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>


&gt;     &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;     &gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;     &gt; --<br>
&gt;     &gt; Tiago Sá<br>
&gt;     &gt; Universidade do Minho, Braga - Portugal<br>
&gt;     &gt;  <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a> &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt; &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>


&gt;     &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Tiago Sá<br>
&gt; Universidade do Minho, Braga - Portugal<br>
&gt;  <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a> &lt;<a href="http://www.tiagosa.com" target="_blank">http://www.tiagosa.com</a>&gt;<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Tiago Sá<br>Universidade do Minho, Braga - Portugal<div><img src="http://wac.2659.edgecastcdn.net/802659/production80/images/icons/favicon.ico"> <a href="http://www.tiagosa.com" target="_blank">www.tiagosa.com</a><br>

</div><br>
</div>