I don't have. Although I am planning to upgrade soon.)
Up to now, I have required users to create an account and login using it.
Now I'd like to offer functionality to clients that don't log in, just connect.
Terminology: LIC = logged in client, Guest = connected, not-logged-in client.
It seems to go pretty well ... except for one thing.
Exiting, then re-entering doesn't work ... the failures are kind of weird,
and a little difficult to describe, but I think the place to start is here:
To exit the app (and return to the front-door page),
an LIC uses orbiter.getAccountManager.().logoff()
That seems to work great.
LIC's disappear from UnionAdmin list of clients right away.
If they then re-log-in immediately, everything is cool.
In other words, the clean-up after the departure is fast and effective.
(A comment in my code says the logoff "disconnects, too", so I don't
call disconnect, nor do I wait for or process a result event.)
With Guests ... not so much.
>>> So here's the question: How should I code a Guest exiting?
Here's what I tried:
- orbiter.disconnect() ... then it takes a few seconds to disappear from UnionAdmin,
and the same window client can login as a new client in the interim. So both can appear
in UnionAdmin for a while, and afterwards, things like sending a message to a room
aren't delivered to the new client. -- FAILED
( Do I need to wait for a result event on that before connecting again?
Or wait for that until trying another connection? And if so how to I make it
as fast as the logoff() call seems to be? ) - accountManager.logoff() --- that seems inappropriate, and also seems to cause other problems. -- FAILED
- orbiter.dispose() -- causes errors inside orbiter, such as "X is not a function" (where I don't remember
what X is). -- FAILED - location.reload --- reinitialize the page. That seems to work, but since the page is kind of
hefty, would increase traffic to the website and looks bad as the screen goes blank for a second. -- WORKS, BUT UGLY
ADDITIONAL INFO added to original post:
1) I measured how long it takes for the client to disappear from UnionAdmin: it's around 20 seconds.
That's enough time for me to click my ENTER and EXIT buttons several times, on one try I had
six of them in there at once, and then watched as they disappeared one by one.
2) Using disconnect() I never get an orbiter CLOSE event ... with the logoff() call,
it shows up right away.
Please help me on this ... it really is blocking my deploying this important new feature.