private void DiscoverFoundService(NetServiceBrowser browser, NetService service, bool moreComing)
 {
     service.DidResolveService += new NetService.ServiceResolved(DiscoverResolvedService);
     service.ResolveWithTimeout(TIMEOUT);
 }
 protected void NetServiceBrowserDidFindService(NetServiceBrowser aNetServiceBrowser, NetService netService, bool moreComing)
 {
     logger.TraceEvent(TraceEventType.Information, 0, String.Format("{0}: didFindService: {1}", aNetServiceBrowser, netService));
     netService.DidUpdateTXT += new NetService.ServiceTXTUpdated(NetServiceDidUpdateTXTRecordData);
     netService.DidResolveService += new NetService.ServiceResolved(NetServiceDidResolveAddress);
     netService.DidNotResolveService += new NetService.ServiceNotResolved(NetServiceDidNotResolve);
     netService.ResolveWithTimeout(10);
 }
Beispiel #3
0
 /// <summary>
 /// Did find bonjour service
 /// </summary>
 /// <param name="browser"></param>
 /// <param name="service"></param>
 /// <param name="moreComing"></param>
 void bonjourBrowser_DidFindService(NetServiceBrowser browser, NetService service, bool moreComing)
 {
     service.DidResolveService += new NetService.ServiceResolved(Remote_DidResolveService);
     service.ResolveWithTimeout(5);
 }
Beispiel #4
0
        private void Resolve(NetService resolve)
        {
            if (resolving != null)
            {
                resolving.Stop();
            }

            resolve.DidResolveService += new NetService.ServiceResolved(resolve_DidResolveService);
            resolve.ResolveWithTimeout(10); /* FIXME timeout doesn't work */
        }
 void _browser_DidFindService(NetServiceBrowser browser, NetService service, bool moreComing)
 {
     service.DidResolveService += new NetService.ServiceResolved(service_DidResolveService);
     service.ResolveWithTimeout(60);
 }
Beispiel #6
0
        /**
        *  FIXME
        */
        public void Resolve(NetService resolve)
        {
            if (resolving != null)
            {
                resolving.Stop();
            }

            resolve.DidResolveService += new NetService.ServiceResolved(Program.gui.p2p_DidResolveService);
            resolve.ResolveWithTimeout(10);
        }
Beispiel #7
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="browser"></param>
        /// <param name="service"></param>
        /// <param name="moreComing"></param>
        void nsBrowser_DidFindService(NetServiceBrowser browser, NetService service, bool moreComing) {
            service.DidResolveService += new NetService.ServiceResolved(ns_DidResolveService);

            Trace.WriteLine("DEBUG: Found - " + service.Name + ". Resolving...");
            service.ResolveWithTimeout(5);
         }
Beispiel #8
0
 /// <summary>
 /// Bonjour callback. We don't remember services until they are resolved
 /// </summary>
 /// <param name="browser"></param>
 /// <param name="service"></param>
 /// <param name="moreComing"></param>
 private void didFindPlayers(NetServiceBrowser browser, NetService service, bool moreComing)
 {
     service.DidResolveService += new NetService.ServiceResolved(didResolvePlayers);
     service.ResolveWithTimeout(5);
 }
        private void Resolve(NetService service)
        {
            if (resolvingService != null)
            {
                resolvingService.Stop();
            }
            resolvingService = service;

            serviceLabel.Text = String.Format("Resolving '{0}'...", service.Name);

            service.ResolveWithTimeout(5);
        }
Beispiel #10
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="browser"></param>
        /// <param name="service"></param>
        /// <param name="moreComing"></param>
        void nsBrowser_DidFindService(NetServiceBrowser browser, NetService service, bool moreComing)
        {
            // Service found. Need to resolve it to find the name

            if (resolvingNS == null)
                resolvingNS = new ArrayList();
            resolvingNS.Add(service);   // So that service is not garbage collected away

            service.DidResolveService += new NetService.ServiceResolved(nsBrowser_DidResolveService);
            service.ResolveWithTimeout(5);
        }