<div dir="ltr"><div>Hi,</div><div><br></div><div>Indeed, nice_agent_send will send it as as a single UDP packet. If the size is bigger than the MTU, the packet will be split by the kernel though, but I believe it will be reconstructed on the other side as a single packet. The issue with split packets bigger than the MTU is that if one of the packets is lost, the entire message is lost.<br>
</div><div>Since you're adding a header, you can save a lot by avoiding the memcpy and using the nice_agent_send_message. Each NiceOutputMessage will represent a single UDP packet, and you can construct your message using the bufffers inside the NiceOutputMessage. We use that internally when we need to wrap data inside a header without doing any memcpy for increased performance.</div>
<div><br></div><div>I hope this helps,</div><div>Youness.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 17, 2014 at 12:15 PM, Olivier Crête <span dir="ltr"><<a href="mailto:olivier.crete@collabora.com" target="_blank">olivier.crete@collabora.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
If you're not in reliable mode, each call to nice_agent_send() will<br>
result in one UDP packet.<br>
<div><div class="h5"><br>
<br>
On Tue, 2014-06-17 at 13:35 +0200, Radosław Kołodziejczyk wrote:<br>
> Hello all,<br>
><br>
><br>
> I have a question about nice_agent_send. We're writing an app that<br>
> would like to wrap a very minimal protocol around UDP transport to<br>
> have a kind of minimalistic error detection. To do so we would have to<br>
> make sure that each of our data packets are delivered in one UDP<br>
> packet (or at least make it as likely as possible). Is there a way to<br>
> determine what's max buffer size that can be passed to libnice's<br>
> nice_agent_send function so that it would not divide the data while<br>
> sending it to the remote side?<br>
><br>
><br>
> Kind regards,<br>
> Radosław Kołodziejczyk.<br>
</div></div>> _______________________________________________<br>
> nice mailing list<br>
> <a href="mailto:nice@lists.freedesktop.org">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>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Olivier Crête<br>
<a href="mailto:olivier.crete@collabora.com">olivier.crete@collabora.com</a><br>
<br>
_______________________________________________<br>
nice mailing list<br>
<a href="mailto:nice@lists.freedesktop.org">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>
</font></span></blockquote></div><br></div>