Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
anyone know of an easy way to take the stdout of a program and send it to a port, and to then be able to connect to that port from somewhere else and and give it as the stdout? I want to piece together a simple lan video stream, so i could use
cat film.avi | toport host 1234
and then
fromport host 1234 | mplayer -
netcat can do this, but i want to be able to conect to the port more than once (so a film will be playing synchronized in two locations. any idea.
Maybe Apache can serve it as well as any, tho IMO "sychronized" will be a problem, there's no way any consecutive viewer can receive hints from the system or the file served where the first hookup occurred...
I was looking for a simple tool which will multicast any data from stdin. This small program seems to do the trick but he's got a bit of an expensive protocol written around it. He expects the clients to acknowledge all the data. It will work but will cause a lot of extra network traffic. The problem with udp is that it can lose packets during high network activity. But with streaming of audio or video it's not a disaster if one packet is lost because the screen might just flicker for one frame and then it will continue on with the next. He's added the acknowledging to make sure the data gets received intact.
You wanted to do something like stream an avi file. Standard avi files aren't a streaming format so the movie will get messed up if you lose one packet. That's why tcp might be a better way, but the problem with tcp is that if you are using two clients it will have to send the data to both clients, which would double network traffic.
Now that I think about it you'll probably run into all kinds of other troubles. So I think your quick simple solution isn't really feasible, unless you like to waste bandwidth and processing power.
You might want to look into streaming video servers if you want a complete solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.