| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
i tried to call simply "run", and that works of course, except that when i close the connection, the runloop does not exit ! using NSLog() i saw that there were many other "input sources" added to the runLoop... (maybe as you said poor design/management but i did not added anything myself like timer etc...). Even chris kane (the only person at apple that explained and give a piece of code about DO) often says on this list that you can't really control the input sources added to the current runloop (it depends on the frameworks you use etc...) so he advices to poll in a while loop !
Polling once a second is, as always, an undesirable option.
basically, the "run" method is based on "runUntilDate: / runBeforeDate: " variant and ACTUALLY poll the run loop ;)
i choosed to poll every one second, but the 1 second was a total guess, i don't know if i should poll less often or more often...
You need not do this, connecting back to the client. Why not just have your client pass in it's representative object to the server's register method? Save that whole slew of extra steps, and avoid issues on the client side with port reuse.
can you explain what you call "it's representative object" (of the client) ? if you talk about the proxy (the vended object) then i tested it and it did not work for that reason : you can (AFAIK, quickly tested) have only *one* vended object per connection !
so if the client use the *same* connection (created by the server), the rootProxy is already the server ! the rootProxy can't be the client...
i must recognize that, thinking about it, there is maybe no need to set the client as the rootProxy : if the client just pass "self" to the server back, then the server may have a *sort of* proxy of the client (?) please confirm this :)
I can't actually remember whether my port allows you to use it without the security stuff, but if so it might be helpful to other's having these sort of problems. If not, someone can probably hack it up so it does.
what do you mean by security stuff ? you manage authentication over DO ? or crypt the transferred datas ??
| References: | |
| >Distributed Objects pitfalls and strategies (From: John Scalo <email@hidden>) | |
| >Re: Distributed Objects pitfalls and strategies (From: Aurélien Hugelé <email@hidden>) | |
| >Re: Distributed Objects pitfalls and strategies (From: Aurélien Hugelé <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.