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; }
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; }
public void Dispose() { if (_udp_peer != null) { try { if (this.IsJoinMulticast) _udp_peer.DropMulticastGroup(this.MulticastAddress); } catch { } _udp_peer.Dispose(); _udp_peer = null; } }
public void Dispose() { if (_udp_peer != null) { try { if (this.IsJoinMulticast) { _udp_peer.DropMulticastGroup(this.MulticastAddress); } } catch { } _udp_peer.Dispose(); _udp_peer = null; } }