I attach part of my code, please tell us if you see something fishy.<div><br></div><div>Thanks again,</div><div>Andrés Suero<br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 9:16 PM, Andrés Suero <span dir="ltr"><<a href="mailto:kaneda.uy@gmail.com" target="_blank">kaneda.uy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Long time Youness,<div>I have another question, Is there an easy way to add a g_io_channel as source and receiver of data of an agent?</div>
<div><br></div>
<div>Thanks a lot,</div><div>Andrés Suero<div><div class="h5"><br><br><div class="gmail_quote">On Wed, May 23, 2012 at 10:37 AM, Andrés Suero <span dir="ltr"><<a href="mailto:kaneda.uy@gmail.com" target="_blank">kaneda.uy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot for your help Youness!<div><div><br><br><div class="gmail_quote">On Tue, May 22, 2012 at 9:54 PM, Youness Alaoui <span dir="ltr"><<a href="mailto:youness.alaoui@collabora.co.uk" target="_blank">youness.alaoui@collabora.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Libnice is indeed thread safe, but you have no reason to be using a thread.<br>
Libnice also requires you to be running the mainloop, otherwise it won't work,<br>
so make sure to run the mainloop, as for your socket, just add a GSource on a<br>
g_io_channel on your socket.<br>
<div><div><br>
On 05/20/2012 04:28 PM, Andrés Suero wrote:<br>
> Youness,<br>
> Thanks for your response, what we have is a socket that bring us the information, then we transfer peer to peer with libnice, and another socket where we need to put the info that we receive from the peer to peer connection.<br>
> The issue is that the info that we need to transfer to the other peer is not given all in one call, we need to check is theres info in the socket time to time to see if theres more, and if it is, we need to send it.<br>
> Is there a way to add a signal to be called in some period of time in the future, so we can check if we have new info to transmit, or some other way to get this effect?<br>
> The other (complicated) way that I thought was to start a thread when we receive the READY state and within this thread call to receive data from the socket and call to sendit peer to peer, but I don't know if this is going to crash all over the place because the call to the libnice to send is going to be from another thread.<br>
><br>
> Another question, Is there a way to attach a function to a signal with a context? this way I don't need to have a lot of global variables.<br>
><br>
> Attached is an example of our code.<br>
><br>
> Thanks,<br>
> Andrés Suero.<br>
><br>
><br>
><br>
><br>
> On 5/19/2012 5:16 PM, Youness Alaoui wrote:<br>
>> Hi,<br>
>><br>
>> I'm not exactly sure why you're doing this, libnice is meant to create peer to<br>
>> peer connections, it's not meant to be used on a server that proxies data<br>
>> between two peers.<br>
>> Either way, no, the component_state_changed only gets fired when the state of<br>
>> the agent changes, so once it goes into READY, it won't get fired again. You<br>
>> should start your own proxying system only after the state goes to READY.<br>
>><br>
>> Hope that helps,<br>
>> Youness<br>
>><br>
>> On 05/18/2012 11:08 PM, Federico Kouyoumdjian wrote:<br>
>>> We are trying to integrate nice to another project.<br>
>>><br>
>>> We have a socket in which we read data when the state of nice is<br>
>>> NICE_COMPONENT_STATE_READY. Then we send the data read in the socket to another<br>
>>> nice agent with the function nice_agent_send.<br>
>>><br>
>>> Our doubt is what happens if no data is available in the sockt to send. If we<br>
>>> don't call the function nice_agent_send (because there is no data available to<br>
>>> send) can we count that cb_component_state_changed will fire again with the<br>
>>> state NICE_COMPONENT_STATE_READY.<br>
>>><br>
>>> Thanks for the help.<br>
>>> _______________________________________________<br>
>>> nice mailing list<br>
>>> <a href="mailto:nice@lists.freedesktop.org" target="_blank">nice@lists.freedesktop.org</a><br>
>>> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> nice mailing list<br>
>> <a href="mailto:nice@lists.freedesktop.org" target="_blank">nice@lists.freedesktop.org</a><br>
>> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
><br>
><br>
> _______________________________________________<br>
> nice mailing list<br>
> <a href="mailto:nice@lists.freedesktop.org" target="_blank">nice@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br>
<br>
</div></div><br>_______________________________________________<br>
nice mailing list<br>
<a href="mailto:nice@lists.freedesktop.org" target="_blank">nice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/nice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/nice</a><br>
<br></blockquote></div><br><br clear="all"><br></div></div>-- <br>La información transmitida es sólo para la persona o entidad a la cual está<br>dirigida y puede contener material privilegiado y/o confidencial. Está<br>prohibida cualquier revisión, retransmisión, difusión o cualquier otro uso<br>
de esta información, o la realización de cualquier acto en base a esta<br>información por personas o entidades diferentes a las originalmente<br>dirigidas. Si ha recibido esta información por error, por favor, póngase en<br>
contacto con el remitente y elimine el material de cualquier computadora.<br>Muchas gracias. <br> <br>The information transmitted is intended only for the person or entity to<br>which it is addressed and may contain confidential and/or privileged<br>
material. Any review, retransmission, dissemination or other use of, or<br>taking of any action in reliance upon, this information by persons or<br>entities other than the intended recipient is prohibited. If you received<br>
this in error, please contact the sender and delete the material from any<br>computer. Thank you.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>La información transmitida es sólo para la persona o entidad a la cual está<br>dirigida y puede contener material privilegiado y/o confidencial. Está<br>prohibida cualquier revisión, retransmisión, difusión o cualquier otro uso<br>
de esta información, o la realización de cualquier acto en base a esta<br>información por personas o entidades diferentes a las originalmente<br>dirigidas. Si ha recibido esta información por error, por favor, póngase en<br>
contacto con el remitente y elimine el material de cualquier computadora.<br>Muchas gracias. <br> <br>The information transmitted is intended only for the person or entity to<br>which it is addressed and may contain confidential and/or privileged<br>
material. Any review, retransmission, dissemination or other use of, or<br>taking of any action in reliance upon, this information by persons or<br>entities other than the intended recipient is prohibited. If you received<br>
this in error, please contact the sender and delete the material from any<br>computer. Thank you.<br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>La información transmitida es sólo para la persona o entidad a la cual está<br>dirigida y puede contener material privilegiado y/o confidencial. Está<br>prohibida cualquier revisión, retransmisión, difusión o cualquier otro uso<br>
de esta información, o la realización de cualquier acto en base a esta<br>información por personas o entidades diferentes a las originalmente<br>dirigidas. Si ha recibido esta información por error, por favor, póngase en<br>
contacto con el remitente y elimine el material de cualquier computadora.<br>Muchas gracias. <br> <br>The information transmitted is intended only for the person or entity to<br>which it is addressed and may contain confidential and/or privileged<br>
material. Any review, retransmission, dissemination or other use of, or<br>taking of any action in reliance upon, this information by persons or<br>entities other than the intended recipient is prohibited. If you received<br>
this in error, please contact the sender and delete the material from any<br>computer. Thank you.<br>
</div>