[Nice] Some useful info about file sending and deliverely

Askar Safin safinaskar at mail.ru
Wed Apr 10 05:18:23 PDT 2013


Probably this conversation on PJSIP mailing list (competitor of libnice) will be useful there:

From: Udit Agarwal <uditiiita at gmail.com>
To: pjsip at lists.pjsip.org

hello everyone,

I want to develop a program in c using pjsip for peer to peer file transfer. As pjsip uses ice and in general ICE uses UDP. I would be using pjnath module to perform this task.

And as I would be sending the file by breaking it into several parts and then re assemble all the parts at the receiver's end, So should i code for handling the packet delivery and packet sequence information or can I assume that these things are already handled.

Please help!!!

-- 
Udit Agarwal
B.Tech. ( Information Technology ) , 8th Semester,
Indian Institute of Information Technology
Allahabad - 211012, India
Email : uditiiita at gmail.com
Mobile: +91-9411656264
_______________________________________________
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

From: Askar Safin <safinaskar at mail.ru>
To: pjsip at lists.pjsip.org

> So should i code for handling the packet delivery and packet sequence information or can I assume that these things are already handled.
Yes, you should handle package delivery etc, because this is UDP.

1. Find "icedemo" program in the pjsip source tree (this program does nearly exactly what you what, i. e.: it sends some data via UDP)
2. Find place in "icedemo" program where it sends data. Replace this code with code which sends data your want.
3. Add some delivery checking
4. Done

Alternatively, you can look into libnice library (it has some bonus, look below) ( http://nice.freedesktop.org/ ). (Sorry, for advertisement of competitor library :)

1. Find the "simple-example" example in the libnice source tree (it was added recently, so you need lastest sources). This program also does nearly you wants.
2. Again, replace code which sends data
3. BONUS! libnice (unlike pjsip, as well as I know) has pseudo tcp sockets (something like tcp over udp). If you use it, you will not need to handle delivery etc. So, try to add pseudo tcp sockets to "simple-example". If you success, then please say me about this (to my personal e-mail (of course, you may send e-mail to pjsip too)).
4. Done

Askar Safin


More information about the nice mailing list