Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Handling Port and IP Address changes



If client A listens on a certain port, registers with Bonjour to indicate this and then at some point in the future listens on a different port, how does client A let other apps know that the port number has changed? 

 

Along the same lines, I do understand that a client should re-resolve before connecting but then how does the client whose port number has changed update this so that a client that is re-resolving gets that port number?

 


From: Marc Krochmal [mailto:email@hidden]
Sent: Sunday, July 01, 2007 8:54 PM
To: Yourch, Chris
Cc: email@hidden
Subject: Re: Handling Port and IP Address changes

 

Hi Chris,

 

On Jul 1, 2007, at 7:32 PM, Yourch, Chris wrote:



I have a “chat” like app that registers with Bonjour and then browses for other “chat” apps. Any “chat” apps that the browse finds I resolve and set a long-lived query on their TXT record.

When the port changes in a particular “chat” app, I deallocate the registration and then re-register with the new port number. The problem is that all the other “chat” apps still see the old port number.  I don’t get any TXT notifications or browse changes to indicate that the port number has changed. How would I know that a port number has changed?

 

Why would the port number need to change such that you'd be required to unregister and then immediately reregister?  The client should always re-resolve the service before connecting to it which will always give you the current port number.  As a last resort, you could always have some kind of increasing serial number in the TXT record and when it changes, that means this is a new service.

 

Best Regards,

-Marc

 

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden

References: 
 >Handling Port and IP Address changes (From: "Yourch, Chris" <email@hidden>)
 >Re: Handling Port and IP Address changes (From: Marc Krochmal <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.