Example #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;
 }
Example #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;
 }
Example #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;
            }
        }
Example #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;
            }
        }