Ejemplo n.º 1
0
        public void  Stop()
        {
            if (reliableSocket != null)
            {
                reliableSocket.Dispose();
                reliableSocket = null;
            }

            if (slpUser != null)
            {
                slpUser.Dispose();
                slpUser = null;
            }

#if mDNS_Discovery
            if (dnsSD != null)
            {
                dnsSD.Dispose();
                dnsSD = null;
            }
#endif

            if (rdmNetSocket != null)
            {
                rdmNetSocket.Close();
                rdmNetSocket = null;
            }
        }
Ejemplo n.º 2
0
        public void Start()
        {
            if (rdmNetSocket == null || !rdmNetSocket.PortOpen)
            {
                rdmNetSocket = new RdmNetMeshSocket(UId.NewUId(0xFF), Guid.NewGuid(), "RDM Snoop");
                rdmNetSocket.UnhandledException += rdmNetSocket_UnhandledException;
                rdmNetSocket.NewRdmPacket       += acnSocket_NewRdmPacket;
                rdmNetSocket.Open(new IPEndPoint(LocalAdapter, 0));
            }

#if SLP_Discovery
            slpUser = new SlpUserAgent("ACN-DEFAULT");
            slpUser.NetworkAdapter = localAdapter;
            slpUser.ServiceFound  += new EventHandler <ServiceFoundEventArgs>(slpUser_ServiceFound);
            slpUser.Open();
            slpUser.Find("service:rdmnet-device");
#endif

#if mDNS_Discovery
            dnsSD = new ServiceBrowser();
            dnsSD.ServiceAdded += dnsSD_ServiceAdded;
            dnsSD.Browse("_rdmNet._udp", "local");
            #endif
        }