Usage of pj_ioqueue_sendto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 5, 2012 at 5:42 PM, Kamal Palei <palei.kamal at gmail.com> wrote:

> Hi All
> I have a small doubt on usage of pj_ioqueue_sendto(ckey, &write_op,
> send_buf, &bytes, 0, &dst_addr,sizeof(dst_addr)).
>
> Please note that memory for send_buf is allocated using malloc function.
>  pj_ioqueue_sendto can return either success , pending or someother error.
>
> Incase of success or error, I can free the memory allocated for send_buf.
> Incase of pending I will not be able to free the  memory for send_buf.
>
> So , when it is the right time to free the memory for send_buf, please
> point with some pseudo code or example.
>
> Once the write operation completes, your on_write_complete() callback will
be called with the op_key that you specified in ioqueue_sendto(). You can
put some data in the op_key to associate it with the buffer to be freed.

 -Benny




> Thanks in advance
>
> Kamal
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120411/3fd9f4b3/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux