ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Right now i am doing a server client program to stream video. The 2 computers are connected by a cable. I am using UDP to do the streaming, i facing quite some problems. Since there is no external traffic , the file i stream over should be idenitical with the file in the server. But this dont happen, there are alway mismatch between the sizes.
This only happen when i stream file which are more than 600kb. Under 600kb, the size of the file at the client side will match. I check it with the ethereal, the server will send an arp packet to find out the client ip address. Could anyone help me solve this problem , i been stuck at this for like 2 months
udp might be the problem. It's fast, but has near to 0 error recovery options (unlike tcp). Mostly used for services where packetloss isn't that important.
From the RFC:
This protocol provides a procedure for application programs to send
messages to other programs with a minimum of protocol mechanism. The
protocol is transaction oriented, and delivery and duplicate protection
are not guaranteed.
yes u are almost guaranteed packet loss with UDP. since ur on a lan the packets are probably getting to the reader much faster than they can keep up with and packets are being dropped. increasing the read buffer size will help a bit, but you will still see packet loss.(stevens unpv1)
You're using UDP...you'll just have to accept that there is some packet loss. But applications such as streaming sound, where a lot of data must be sent quickly (so minimal overhead is important, which UDP provides) and it's not important that all of it get there (when you're listening you're not going to notice a missing packet here or there) is exactly what UDP is designed for.
So I wouldn't worry too much, really. If you want everything to get there, use TCP--but be prepared for slower transfer times because of the additional overhead.