UDP multi-cast : Udp « Network « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Mail;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Xml;

public class MainClass
{
    public static void Main()
    {
        using (UdpClient udp = new UdpClient(1024))
        {
            IPAddress groupAddress = IPAddress.Parse("0.0.0.0");
            udp.JoinMulticastGroup(groupAddress, 32);
            udp.EnableBroadcast = true;

            IPEndPoint sentBy = null;
            byte[] data = udp.Receive(ref sentBy);
            udp.DropMulticastGroup(groupAddress);
        }
    }
}








33.10.Udp
33.10.1.UDP multi-cast
33.10.2.Udp time out option
33.10.3.new UdpClient(5555) Receive