Ejemplo n.º 1
0
 public EzUdpPeer(IPAddress address, int port)
 {
     this.WireProtocol = new EzUdpWireProtocol();
     this.MulticastAddress = IPAddress.Parse("224.1.1.100");
     this.IsJoinMulticast = true;
     _udp_peer = new UdpPeer(address, port);
     _udp_peer.DataReceived += udp_peer_DataReceived;
 }
Ejemplo n.º 2
0
 public EzUdpPeer(IPAddress address, int port)
 {
     this.WireProtocol       = new EzUdpWireProtocol();
     this.MulticastAddress   = IPAddress.Parse("224.1.1.100");
     this.IsJoinMulticast    = true;
     _udp_peer               = new UdpPeer(address, port);
     _udp_peer.DataReceived += udp_peer_DataReceived;
 }
Ejemplo n.º 3
0
        public void Dispose()
        {
            if (_udp_peer != null)
            {
                try
                {
                    if (this.IsJoinMulticast)
                        _udp_peer.DropMulticastGroup(this.MulticastAddress);
                }
                catch { }

                _udp_peer.Dispose();
                _udp_peer = null;
            }
        }
Ejemplo n.º 4
0
        public void Dispose()
        {
            if (_udp_peer != null)
            {
                try
                {
                    if (this.IsJoinMulticast)
                    {
                        _udp_peer.DropMulticastGroup(this.MulticastAddress);
                    }
                }
                catch { }

                _udp_peer.Dispose();
                _udp_peer = null;
            }
        }