Commit Graph

5683 Commits

Author SHA1 Message Date
Michael Bayne 73dd5beda4 Same here even though we were doing long arithmetic which would most likely
avoid blowage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5750 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:18:50 +00:00
Michael Bayne 7e777e9c72 Divide the millis by 1000 to get seconds instead of multiplying the numerator
and blowing an int.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 22:17:36 +00:00
Michael Bayne da4159c665 Switch to the ServerCommunicator. I'm sure it'll work just fine!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5748 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:51:06 +00:00
Michael Bayne a2d6549121 Comment fix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5747 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-27 19:48:00 +00:00
Tom Conkling eb4b8674af ArrayUtil.sortedInsert
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5746 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-26 20:34:29 +00:00
Charlie Groves 749ab8e1bb google-collect upgrade
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5745 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 23:01:40 +00:00
Michael Bayne 510ddbb717 Instated some debug logging. Some day maybe I'll make it easy to enable debug
logging in a fine-grained way in a running server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5744 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-24 19:03:17 +00:00
Michael Bayne 6fe7159b4c Provide an Iterable for our client objects.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5743 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 17:01:38 +00:00
Ray Greenwell 5df1335471 Add an easy way to initialize.
Jeez, this whole thing could *almost* go away if we moved to flash 10
and used Vector, but of course, there's no way to get the type of
Vector. Maybe there is, with describeType(). Can't experiment now.
I'd fall out of my chair if there were.
We need to know in case sending an empty array to the server,
it's still gotta be the right type (with non-empty we could
try examining the first element).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5742 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 00:30:44 +00:00
Ray Greenwell bfcb45434e Ye olde razor. Now that I know abjectscript like the back of my hand,
reviewing some of the first code written in it might be a good idea.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5741 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-23 00:23:34 +00:00
Michael Bayne c754d42f5b Oops, it's called addDispatcher() now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5740 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:58:18 +00:00
Michael Bayne 9155065ca8 Let's call it addDispatcher() to distinguish it from InvocationManager's
registerDispatcher() which requires a corresponding call to clearDispatcher().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5739 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:55:33 +00:00
Michael Bayne 398ee3cfa2 Grant handy automatic invocation service clearing to place manager delegates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5738 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:53:24 +00:00
Michael Bayne 1eefc50828 Common problem: place managers register dispatchers when started up and forget
to clear them when they shutdown. Solution: add a mechanism for registering
dispatchers such that they are auto-cleared when the manager shuts down.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5737 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:44:03 +00:00
Mike Thomas 48b3a27af8 Prevent a divide by zero error attempting to generate a log.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5736 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-20 17:12:27 +00:00
Michael Bayne 916cb30339 Clear out our _bstrap reference when we logoff. What's good for the
ActionScript goose is good for the Java gander.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5735 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-18 00:07:54 +00:00
Michael Bayne c21f8ad735 Clear out our _bstrap reference after we logoff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5734 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-18 00:06:06 +00:00
Michael Bayne 597062f0bc Oops. Can't do that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5733 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 22:57:55 +00:00
Michael Bayne 51f1f273d9 Allow 1.6 source but continue to target 1.5 bytecode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5732 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 22:49:29 +00:00
Ray Greenwell f03caf98fe Use Util.adapt(). Look at this functional programming masterpiece.
I'm not sure how much actual utility is here, and how much I just like the
gee-whiz factor.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5731 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 21:27:35 +00:00
Ray Greenwell 62fb546f27 Check this out. This little buddy rocks.
I sorta want to make a new FunctionUtil so that I can use it
with impunity everwhere without having to include the other crap in here.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 21:23:23 +00:00
Ray Greenwell bb87184632 Should resolve infinite recursion with SortedHashMap.
Tip from the pros: when you change a class, you might want to check
the subclasses for possible problems with that change.
:P


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 20:01:01 +00:00
Ray Greenwell 96bdaf9f1f Allow XML to be encoded.
Let's try it and see if it works. Let us know Nathan.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5728 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-17 01:06:00 +00:00
Ray Greenwell d354d951b8 Small tweaks. Apply directly to the nipples.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5727 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 23:00:36 +00:00
Ray Greenwell cbbd1f281d WeakValueHashMap. Apply directly to the ...
I hate your checkin comments, but I love your product!

The real reason I cleaned up HashMap: I override
forEach(), and now I don't need to do anything to make values() and keys()
work properly for weak values. Less code is better code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:55:40 +00:00
Ray Greenwell dbf20bdc28 WeakReference. Apply directly to the forehead.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:53:35 +00:00
Ray Greenwell 3300421741 - Use [] instead of "new Array()"
- Implement keys() and values() using forEach().
  - Less code is better code.
  - But, it's less efficient:
    - values() now looks up simple-key values by hashing
    - values() now unwraps non-simple keys, even though unneeded
    - keys() looks up simple-key values, even though unneeded

Say it with me like a 14-year-old girl: whatEVER!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5724 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 22:51:12 +00:00
Jamie Doornbos e76d1a6610 Interesting... if the peer disconnects before the node object subscription completes, an NPE would fire... but could this have prevented a lock from being release. It doesn't seem likely since a lock probably can't be assigned until the subscription is complete anyway(?). But then again, maybe some information is passed prior to this. In any case, stop throwing an NPE here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-16 17:12:15 +00:00
Ray Greenwell 0f73afc492 This class is remarkably pointless.
We could trash it and change our toStringBuf() methods
to just return a String. I guess. Then the caller would
have to assign the string somewhere. I guess this has some value.

So anyway: Occam's razor, and fixes a small bug: appending undefined
would print as "null" since it was being forced to an Object first.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5722 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 20:25:26 +00:00
Ray Greenwell 305c53f53a These are breaking asdoc.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5721 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 18:52:15 +00:00
Michael Bayne 61f752a105 Check the right things in our Preconditions.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:28:07 +00:00
Michael Bayne b160aa944f Let's just have SafeSubscriber take two callbacks instead of forcing everyone
to screw around with SubscriberAdapter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5719 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:22:24 +00:00
Michael Bayne 202f6bba81 Widening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5718 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-15 00:13:29 +00:00
Michael Bayne e1b29dbf6f The BodyObject can definitely supply its Name.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5717 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-14 16:31:17 +00:00
Ray Greenwell 021b5dab22 I swear I had made one of these way back when. Here it is again.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5716 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-14 01:40:14 +00:00
Ray Greenwell d1d6aa50d9 Unburden init() from things that can be injected.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5715 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-11 01:21:19 +00:00
Ray Greenwell 24760fa266 Create our PeerNode object through injection.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5714 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-11 01:12:16 +00:00
Ray Greenwell 18d36176a3 The PeerNode is the thing that calls clientLoggedOn/Off on the PeerManager,
so let's keep with that pattern for any clients there when the
peer itself connects or disconnects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5713 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-10 22:25:35 +00:00
Michael Bayne 7f97d41fd5 Fail earlier here if we have no _clobj. I have been seeing this in testing,
though annoyingly now I can't reproduce it. Call Heisenberg!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5712 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-08 20:32:47 +00:00
Michael Bayne e90fb7465d Avoid calling bytesAvailable if the socket is not connected. It causes needless
exception throwage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5711 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-07 20:51:10 +00:00
Michael Bayne ca8904b9db Let's actually name that something different.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:19:25 +00:00
Michael Bayne 3b1024651a Split our reports into the default report and a separate report for the giant
morass of profiling data.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5709 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:13:59 +00:00
Ray Greenwell fd321d6f2d Let directors dispatch events.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5708 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-06 21:10:32 +00:00
Ray Greenwell c192056f3a Listen for security errors on our socket.
Have the FrameReader stop listening on the socket when we're done with it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5707 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-04-03 17:40:54 +00:00
Michael Bayne cc1690654a No longer need this platform hackery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5706 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-31 01:36:58 +00:00
Michael Bayne 752642db17 Nixed more asdoc-killing unused imports. Why these didn't kill my local asdoc
but do on the build server, I know not.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5705 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-31 01:20:08 +00:00
Michael Bayne 6f535f3346 Added asdoc target.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5704 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-30 22:55:27 +00:00
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 bc6929d239 Actually, let's make a whitelist the valid modes.
YAGNI code, no ability to break-out the whitelist.
No other game of ours uses other valid modes, does it?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5701 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 23:36:03 +00:00