コード例 #1
0
        public Client(ClientForm clientForm)
        {
            this.clientForm  = clientForm;
            client           = new UdpClient();
            multicastAddress = IPAddress.Parse("239.0.0.222");
            ipEndPoint       = new IPEndPoint(IPAddress.Any, 2222);

            client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
            client.ExclusiveAddressUse = false;
            client.Client.Bind(ipEndPoint);

            client.JoinMulticastGroup(multicastAddress);
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: RoganMelo/SocketMulticast
        public Client(ClientForm clientForm)
        {
            this.clientForm = clientForm;
            client = new UdpClient();
            multicastAddress = IPAddress.Parse("239.0.0.222");
            ipEndPoint = new IPEndPoint(IPAddress.Any, 2222);

            client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
            client.ExclusiveAddressUse = false;
            client.Client.Bind(ipEndPoint);

            client.JoinMulticastGroup(multicastAddress);
        }