• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bonjour and Airport
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bonjour and Airport


  • Subject: Bonjour and Airport
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 12 Jul 2007 23:37:03 +0200

1. netResolver = [ [ NSNetService alloc ] initWithDomain: @"local." type: someType name: someName];
[ netResolver setDelegate: someObject ];
[ netResolver resolveWithTimeout: someTime ];
"someName" is a Bonjour Service provided by a programm running on another computer, connected via Ethernet.


2. someObject:
- (void)netServiceDidResolveAddress:(NSNetService *)sender
{
NSArray *addresses = [ sender addresses ];
// select some address with sa_family = PF_INET
NSSocketPort *porT = [ [ NSSocketPort alloc ] initRemoteWithProtocolFamily: PF_INET socketType: SOCK_STREAM protocol: IPPROTO_TCP address: adr ];


outConnection = [ [ NSConnection alloc ] initWithReceivePort: nil sendPort: porT ];
serverProxy = [ outConnection rootProxy ] ;
[ serverProxy someMessage];
}


This works ok if Sytem Preferences -> Network -> Network Status shows:
(green) Build-in Ethernet currently active. You are connected to the Internet via Build-in Ethernet.
(red) Airport off


But when I see:
(green) Airport on. You are connected to the Internet via Airport
(green) Build-in Ethernet currently active.

then [ outConnection rootProxy ] creates an NSPortTimeoutException.

What am I doing wrong?

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Bonjour and Airport
      • From: Jacob Engstrand <email@hidden>
  • Prev by Date: Re: NSNumberFormattter not working
  • Next by Date: Bonjour Rendezvous
  • Previous by thread: Remove minimize and maximize button from NSPanel.
  • Next by thread: Re: Bonjour and Airport
  • Index(es):
    • Date
    • Thread