On Dec 14, 2005, at 6:00 PM, Ed Zavada wrote:
> 2) Changes to the protocol that break wire compatibility between
> OpenPlay versions. For many people it wouldn't matter, for others
> it would be a big deal. I can see several possible approaches:
> a. As you suggested, new version recognizes both versions and
> either doesn't send ping or builds enum packet in such a way as to
> let old OpenPlay be unaffected. This seems best if possible.
> b. Have a switch in the config that determines whether the ping
> time is added to the packet or not, defaulting to off. This is
> similar to Shawn's suggestion, but I think it's better than
> separate API calls because it keeps the interface cleaner.
After looking into this, I think the only workable solution is going
to be (b).
The problem is that if a new OpenPlay client is talking to an old
OpenPlay server, there's no way to easily construct an enum query
packet that'll work with both. The new enum query packet must contain
the client's start time (so that it can determine the roundtrip time
when the host passes it back in the enum response). The old parsing
code is very rigid about the query packets it receives. Old hosts
will reject any enum query that isn't an exact match for the old style.
One alternative is to send out 2 different enum query packets
simultaneously in the new client code - an old-style one and a new
one. However, you'll very likely get 2 queries back from each new
host and then you've got all kinds of nasty decisions about what to
do with the ping info that goes lost, or arrives later or whatever. I
don't care for that, and it could only get worse in the future as
enum query/response packets get updated for other features.
But (b) will do the trick. By adding a new optional field to the
Config string, say "enumVersion=2", you can effectively say that your
client will only send out new-style enum query packets and can only
receive back query responses from hosts that recognize this version.
An absence of this field in the config string (which is the case with
the old OpenPlay code) would imply a version of 1 - the old style
enum query/response. This should allow all the combinations of new/
old client/server OpenPlay to work. I'm not super-thrilled about this
- it's a bit of an arcane way to tell OpenPlay that you want ping
times, but c'est la vie.
I'll try to get this done soon, but my spare time is going to be
limited until after the New Year, so it may be a few weeks.
--
Brad Oliver
bradman@pobo...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Openplay-dev mailing list (
Openplay-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/openplay-dev/subscriber%40opensubscriber.com
This email sent to
subscriber@open...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.