Esempio n. 1
0
        public UDPClientServer()
        {
            identifier = new Random().Next(int.MaxValue);
            hostName   = @"224.109.108.107";
            port       = 3007;

            this.channel = new UdpAnySourceMulticastChannel(IPAddress.Parse(hostName), port);
            this.channel.PacketReceived += new EventHandler <UdpPacketReceivedEventArgs>(messageReceived);
            this.channel.Open();
        }
Esempio n. 2
0
        public UDPClientServer(String _hostName, int _port)
        {
            identifier = new Random().Next(int.MaxValue);
            hostName   = _hostName;
            port       = _port;

            this.channel = new UdpAnySourceMulticastChannel(IPAddress.Parse(hostName), port);
            this.channel.PacketReceived += new EventHandler <UdpPacketReceivedEventArgs>(messageReceived);
            this.channel.Open();
        }