Redirect UDP lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Mike.Cornflake · 2016-03-12 17:24 Network programming :-(  I'm rubbish at it.  Don't even know the questions to ask :-( Can someone please point me to resources that will help me research and implement the following? Listen on a certain Port for a UDP packet, then broadcast that packet to three other ports.Rest of this is background in case someone is interested or if it helps direct me to the right place. I'm trying to port all my Multimedia code from DirectShow (ie Windoze only) to mplayer.  One of the challenges is synchronising multiple video channel playback (within the same app). I'm getting excellent results from putting one instance of mplayer into UDP master mode, and another into Slave mode http://www.mplayerhq.hu/DOCS/HTML/en/networksync.html Problem is, the first mplayer slave blocks that port, so other slaves can't listen in.  That protocol was developed around synchronising video playback across multiple PC's, and while I've seen the issue acknowledged in various forum posts, I can't find a solution.  On the one PC then; only a single instance of mplayer can be slaved to the one master.  All my testing has been done using 127.0.0.1.  Using -udp-port I can set each of the slaves to listen on their own port.  What I'd like to do is intercept the "datagram" (whatever that is) being broadcast by the master, and broadcast it out again on each of the ports I've assigned to the slaves. Many thanks ---------------------------------------------------------------------- Mike.Cornflake · 2016-03-13 12:44 This is looking like it isn't going to be that hard.  Several libraries are available: Synapse/lNet/fcl-net.  As part of my learning curve, I'll have a bash at implementing this in each of those. ---------------------------------------------------------------------- JZS · 2016-03-14 13:39 There is an Indy component "IdMappedPortUDP" that might be at use in your case. Quote from: Mike.Cornflake on March 12, 2016, 06:24:35 pm...intercept the "datagram" Something like Wireshark? That does not sound easy. ---------------------------------------------------------------------- Mike.Cornflake · 2016-03-14 14:54 QuoteSomething like Wireshark? That does not sound easy. I've actually downloaded Wireshark as part of my research, but I'm not fully up to speed with what it does.  Someone has recommended it as being very useful when debugging network code.  Haven't got it working yet. But from what I can gather, no - not really.  Wireshark seems to be a logger that sits, err, somewhere, and tracks everything.  My code is going to be listening on a specific IP and specific Port. I'll admit though, that when I say easy, I'm making assumptions.  Assumption 1 is that I don't have to interpret this "datagram", I just need to load it into a buffer and copy out to each of the other ports. I'm swamped at work at the moment, so it's going to be quite a while before I get around to testing anything, but I'll post results here in case there are other network beginners like me :-) Thanks for the Indy suggestion - I'll add that the list of libraries to test this in.  The Wiki seemed to imply this port wasn't really in a finished state.  I may have misread though...