TCP vs UDP on video stream

Drawbacks of using TCP for live video: As you mentioned, TCP buffers the unacknowledged segments for every client. In some cases this is undesirable, such as TCP streaming for very popular live events: your list of simultaneous clients (and buffering requirements) are large in this case. Pre-recorded video-casts typically don’t have as much of a … Read more

UDP Multicast over the internet?

In general this is not possible since multicast packets aren’t routed. There are some techniques to work around this (DVMRP, MOSPF and others) but they all require that you can configure all the routers between your server and the clients (or create a tunnel). There are backbone networks (Abilene, Mbone) with multicast support, but those … Read more

Sending UDP Packet in C#

Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); IPAddress serverAddr = IPAddress.Parse(“192.168.2.255”); IPEndPoint endPoint = new IPEndPoint(serverAddr, 11000); string text = “Hello”; byte[] send_buffer = Encoding.ASCII.GetBytes(text ); sock.SendTo(send_buffer , endPoint);

What would cause UDP packets to be dropped when being sent to localhost?

Overview What is causing the inability to send/receive data locally? Mostly buffer space. Imagine sending a constant 10MB/second while only able to consume 5MB/second. The operating system and network stack can’t keep up, so packets are dropped. (This differs from TCP, which provides flow control and re-transmission to handle such a situation.) Even when data … Read more

Sending and receiving UDP packets?

The receiver must set port of receiver to match port set in sender DatagramPacket. For debugging, try listening on port > 1024 (e.g. 5000 or 9000). Ports < 1024 are normally used by system services and need admin access to bind on such a port. If the receiver sends packet to the hard-coded port it’s … Read more

UdpClient receive on broadcast address

Here’s the jist of some code I am currently using in a production app that works (we’ve got a bit extra in there to handle the case where the client are server apps are running on a standalone installation). It’s job is to receive udp notifications that messages are ready for processing. As mentioned by … Read more