Commit Graph

702 Commits

Author SHA1 Message Date
Michael Bayne 916950e873 Nixed unused imports that were breaking asdoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5703 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-30 22:55:13 +00:00
Ray Greenwell ab8406806e The quick fix: It was never intended that there'd be two goddamn
ChatDirectors in a client.

The slow fix: Maybe I can fix _that_.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5702 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-27 22:46:11 +00:00
Ray Greenwell 423aee81af Move broadcast filtering into the command handler.
Break out the actual doing of the broadcast so that just that can be overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5699 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 22:01:49 +00:00
Ray Greenwell 3c8e293071 Added a way to suppress the feedback generated when a mute is changed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5694 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 21:38:14 +00:00
Ray Greenwell 52cedb5bdb Comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5692 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 21:00:38 +00:00
Ray Greenwell d46acc6bc4 Added createReverse(), and make comparators compatible with a flex Sort
object.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5691 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 20:56:34 +00:00
Ray Greenwell 904be81707 Actually, let's only allow suppressing flushing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5690 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 00:30:27 +00:00
Ray Greenwell 195d764347 Allow flushing and notifying to be suppressed when a value is set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5689 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-24 00:27:46 +00:00
Michael Bayne 5d0a86c698 If we never dispatched a DID_LOGON, then don't dispatch a DID_LOGOFF. Dispatch
a FAILED_TO_LOGON instead.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5688 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-19 23:40:03 +00:00
Ray Greenwell af14e64c04 Moved these here functions to Util.
Immediately after writing them I considered that they didn't
really belong in ArrayUtil, since they don't operate on Arrays.
Util is better, since it's less specific.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5686 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-18 01:13:38 +00:00
Michael Bayne d67bcc5e01 Track more accurately whether or not we're switching servers and publish that
in the ClientEvent that is sent out with all will/didLogon and will/didLogoff
notifications.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5681 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-05 23:56:02 +00:00
Ray Greenwell aa0bb22527 Added keys() and values() to Array-ificate Object/Dictionary properties.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5679 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-05 01:03:06 +00:00
Ray Greenwell 1566d00c75 These should all be immutable.
Hopefully nothing was setting the values.
If so, maybe we'll see compile-time errors/warnings.
Maybe.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5677 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-03 22:30:15 +00:00
Ray Greenwell 07a42c7364 Added a note. It's not a complete adobe fuck-up, as it works in
test cases I've made, it just doesn't work in *other instances*,
which I haven't yet been able to control for.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5676 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-03 22:26:18 +00:00
Michael Bayne d4f1e7763c Send our auth request directly instead of running it through the queue. Also
log our boot groups to make it easier to distinguish which "server" we're
logging onto.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5675 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-27 03:13:08 +00:00
Ray Greenwell 1b585febf9 Tighten this up a bit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5674 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-26 00:42:26 +00:00
Ray Greenwell 64b6df7dfa It's another "Jesus, really Adobe?" commit message!
Apparently they enhanced AMF3 encoding in flash 10. Dictionaries
seem to be encoded differently. I'm sure they thought that they
could sneak this in because it's backwards-compatible, but they
thought wrong. If a Flash 10 client encodes a Dictionary, it
can't be read by a flash 9 client because it's not forwards-compatible.

If you change the spec, you gotta change the version number, because
this shit might be persistent.

So: work around it. Might be sketchy. Let's keep an eye on it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5673 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-26 00:24:23 +00:00
Ray Greenwell ad09bec805 Allow whether we're persisting to be queried.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5672 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-25 04:39:56 +00:00
Ray Greenwell 63181c6fc1 Allow to be constructed in, and flipped between, storing
preferences or just providing a runtime place for them to live.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5671 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-25 04:33:55 +00:00
Michael Bayne ba7a7af8d3 Sanity++. In theory this is functionally equivalent.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5661 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-19 21:08:07 +00:00
Ray Greenwell 302665c65a Added loadClasses(), for convenience of the common pattern of loading
stuff into an ApplicationDomain.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5658 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-18 19:38:55 +00:00
Jamie Doornbos c5b7379dea Modernized logging of safe object manager
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5652 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-11 21:51:52 +00:00
Tom Conkling bb9f068782 commentfix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5650 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-02-06 21:24:41 +00:00
Ray Greenwell 02d97ddec1 Allow a preconfigured URLRequest to be passed in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5646 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-30 00:12:22 +00:00
Ray Greenwell 8058dd35e8 Added the ChatSnooper interface, to hear about chat from the server
prior to it being filtered.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5622 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-07 02:22:12 +00:00
Michael Bayne 053d411d41 Have the LocationDirector configure the ChatDirector with the current place
rather than having the ChatDirector listen for location changes from the
location director. This allows us to have multiple location directors work with
the same chat director as long as we're only in one place in one of the
location directors at a time.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5621 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-06 22:24:28 +00:00
Ray Greenwell 0c4665e587 We actually want to refuse to stream either int or Number
plainly. Actionscript prevents us from reliably using them.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5619 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-06 02:11:55 +00:00
Jamie Doornbos 5cfb56f003 Fix recently introduced error where int values could not be written out as objects, particularly problematic for generic containers like StreamableHashMap. This was causing the creation of tables to fail for any game with a "range" custom parameter. There is likely a better fix for this, but this will do until we think of it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5617 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-01-04 22:27:37 +00:00
Ray Greenwell 7728ed9bd3 Further cleanup: always look up streamers by their java name.
- Sliiiiightly less efficient in a few cases.
- But: looking typed arrays up by class didn't work anyway,
  there was some duplicated code in jname and class lookup,
  and the jname thing handles Lists from the server. So
  overall I think this is a win.
Less code is better code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5610 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-31 00:41:20 +00:00
Ray Greenwell e9152193b7 - Just use dictionaries, which are inside the HashMaps anyway.
- Register Long.

(I could probably sweep through narya and re-jigger a bunch of
the actionscript code that was written while I was learning the
language.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5609 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 23:59:40 +00:00
Ray Greenwell e6ea84e5da Refactor to avoid linear lookup of streamers.
This was a bit of a rabbit hole and took longer than expected,
and I had a stupid bug that took a while to find,
but in the end there are way more lines of code removed than
added, so I'll call it a win. Streamer lookup is now via a Dictionary.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5608 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 23:25:50 +00:00
Ray Greenwell c7612ecb7d Apply Jamie's fix for negative numbers here on the actionscript side, too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5607 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-30 20:25:51 +00:00
Ray Greenwell 9f920ae527 Added a note for Future Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5606 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-19 22:13:24 +00:00
Ray Greenwell 7be46ee045 This all seems to work, so let's tidy it up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5605 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-15 19:39:49 +00:00
Par Winzell fb4a28b2ed Give Bureaus their own client object subclass. It does nothing at the moment, but we need it to be a distinct type for access control purposes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5600 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-12 15:36:46 +00:00
Jamie Doornbos 1052aa86ec readUTF?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5599 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-11 20:01:46 +00:00
Par Winzell 0cfc7fcc9e Turn debugging off again. Whew.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-11 19:53:16 +00:00
Par Winzell 31388566f6 Turn on streaming I/O debugging long enough to get better debugging data on the development server. Will be flipped back ASAP.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5597 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-11 19:35:25 +00:00
Ray Greenwell df5f5ace27 Cut client latency by attempting to send upstream messages
immediately.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5592 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-10 21:41:10 +00:00
Ray Greenwell 7c979eb436 Logging varagification, associated stack traces.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5587 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-10 01:05:41 +00:00
Ray Greenwell a3e1c6e09e Fixup.
If there's an error when calling the callback function,
we were assuming it was an argument-related error and trying again.
However, this is sorta bad behavior as we don't want to call
twice into a callback. In the case I was seeing, the first time
in caused an NPE, but popped up a panel, and the second try
was no-opping because the panel was already up (but misconfigured).

So: don't even try a second call, because it looks like
flash will accept args to an argless function.
We'll have to try this out for a while and see if it works.
If so, I can neaten this code. If not, I'll uncomment
some of this and try a more surgical approach (only catch
ArgumentError, only retry if we had 1 boolean arg.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5585 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-09 23:23:15 +00:00
Ray Greenwell 5f69af762d Reorder the args to these adapters: success is first now, followed by failure.
This has been wacked-out like this ever since I first wacked it out.
Since the base class is ResultAdapter and it only takes failure, and the
'processed' function for ConfirmAdapter is optional, it seemed to make
sense this way.
But, we have another ResultAdapter (for non-invocation ResultListener)
and it expects success first.
So Mike noticed this today (I swear there was a big brouhaha about this
over the summer) and beat me with my own rubber chicken.
I'm not sure why I had a mental block about reordering, but let's do it!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5583 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-09 02:20:48 +00:00
Nathan Curtis 34d2833580 Enums can safely be used as Dictionary keys, and should therefore pass the isSimple() test.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5581 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-12-06 00:39:05 +00:00
Ray Greenwell e649880f90 Allow a message to be passed to happy testing dumpStack()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5566 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-20 19:48:47 +00:00
Par Winzell 13c9f01b6e Go go invisible unicode characters.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5562 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-19 17:24:01 +00:00
Par Winzell 5d769cbf5f So, Flash CS4's internal compiler chokes on public class that implements an interface, when it's followed by faux-inner-classes after the main package declaration. This is the only workaround I can think of; pray god Adobe fixes their stuff soon and we can revert this irritating patch.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5561 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-19 15:14:29 +00:00
Jamie Doornbos 79f5a17600 Oops, stray debug line got left in
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5549 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-14 01:51:28 +00:00
Jamie Doornbos 71af5514da Be nicely behaved if the user manages to close the client before the socket is opened
* Use _writer != null iff the socket is open and the authrequest has been sent
* Warn when posting messages prior to socket connect
* Clear the outgoing queue prior to sending the auth request, the servers authing connection expects this
* If a logoff is encountered prior to the socket opening, just shut down without sending auth request
* Driveby unused variable removal

This should fix the log warning "AuthingConnection$1: Received non-authreq message during authentication process"

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-14 01:49:58 +00:00
Michael Bayne ca2dc8dc4a Don't start our writer thread until we know our socket is connected and ready
to send data.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:32:54 +00:00
Michael Bayne c62cf6ba6f Don't start our tick interval until we've successfully logged on. There's no
utility in sending pings before we're authenticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5543 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-12 00:30:35 +00:00