Ejemplo n.º 1
0
        public void Start(string name)
        {
            service = new NSNetService("", "_debugger._tcp.", name, 0);

            service.Delegate = this;
            service.Publish(NSNetServiceOptions.ListenForConnections);
        }
		public void Start (string name)
		{
			service = new NSNetService ("", "_debugger._tcp.", name, 0);

			service.Delegate = this;
			service.Publish (NSNetServiceOptions.ListenForConnections);
		}
Ejemplo n.º 3
0
 public static void Register()
 {
     Logging.Log("[Discovery] Registering...");
     service = new NSNetService("local", "_imb._tcp", NSUserDefaults.StandardUserDefaults.StringForKey("DiscoveryDisplayName"), 9080);
     service.Publish();
     Logging.Log("[Discovery] Registered");
 }
Ejemplo n.º 4
0
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _ns = new NSNetService("", "_bonjourdemoservice._tcp", UIDevice.CurrentDevice.Name, 9999);

            _netDel = new NetDelegate(this);

            _ns.Delegate = _netDel;

            //BUG: monotouch 3.3.1 has TXTRecordData incorrectly bound to a bool. will be fixed in v.Next
            //var dictionary = NSDictionary.FromObjectAndKey (new NSString("some message about the service..."), new NSString ("someKey"));
            //var record = NSNetService.DataFromTxtRecord (dictionary);
            //_ns.TxtRecordData = record;

            _ns.Publish();

            window.MakeKeyAndVisible();

            return(true);
        }