<br>Ok, well, I guess that's not my problem then!<br><br>I feel like I'm very close...<br><br>I have two agents... both of which are getting their local candidates, serializing them and sendthing them to the other...<br>
<br>Both of them are also sending their local credentials to each other and calling "nice_agent_set_remote_credentials()" on them...<br><br>They are both talking to my stun server, and I believe that all of the information is being serialized and deserialized correctly (it's safe to use nice_address_to_string() and nice_address_set_from_string() to serialize and deserialize the NiceCandidate->addr and NiceCandidate->base_addr members right?)... <br>
<br>BTW, do I need to set the "NiceCandidate->username" and "NiceCandidate->password" fields if I am seperately sending the credentials ( I currently am both sending them as part of my NiceCandidate serialization process and seperately for calls to set_remote_credentials())...?<br>
<br>The behaviour that I'm seeing is that my componet state never changes to 4... it goes right from 2 to 5... then a send() of course fails...<br><br> td<br><br><div class="gmail_quote">On Mon, Aug 30, 2010 at 2:47 PM, Youness Alaoui <span dir="ltr"><<a href="mailto:youness.alaoui@collabora.co.uk">youness.alaoui@collabora.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">On 08/30/2010 05:43 PM, Tony Di Croce wrote:<br>
> In the "test-thread.c" example application that is included in the<br>
> libnice source tree a number of threads are created...<br>
><br>
> My current thinking is that "lthread" and "rthread" are needed to<br>
> implement the main loop of the agents themselves... IE.. The threads<br>
> that execute the "candidate-gathering-done" etc signals...<br>
><br>
> I'm less sure about "ldthread" and "rdthread".... These seem to be used<br>
> when you're attaching a recv function... So I'm guessing these are<br>
> internal worker threads that actually do the data transfer between<br>
> endpoints? If so, do you need a thread like this per stream or is one<br>
> worker thread for the whole agent sufficient?<br>
><br>
> td<br>
<br>
</div></div>No threads are needed, The test-thread.c example is for "testing threads", it's<br>
there to make sure that even if libnice is being used by a multi-threaded<br>
environment, the library is thread-safe. It does not mean at all that you need<br>
to be using threads in order to make it work.. you only need one thread, your<br>
main one, the one where your main_loop is running, that's why you give the<br>
nice_agent_new the main_context to your mainloop, and that's why you give it to<br>
the nice_agent_attach_recv. That's all you need.<br>
<br>
p.s: Please keep asking your questions on the mailing list.<br>
<br>
Youness.<br>
<br>
</blockquote></div><br>