Commit Graph

5661 Commits

Author SHA1 Message Date
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
Mike Thomas 5ba9ea1faa Fix a big ol' memory leak. This remove() call appears to have accidentally gotten commented out in a warnings-cleanup pass because it used to assign the result of the remove to a variable only used in a commented-out Log.info(). Since the receivers stored in the hashtable can point to exciting things, like, say, puzzle panels, it was causing a pretty immense amount of stuff to get held onto.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5700 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 23:26:26 +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
Michael Bayne 88bec3d641 Prunexorz!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5698 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 00:43:50 +00:00
Michael Bayne 688f2580ed Varargified log calls.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5697 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-26 00:02:19 +00:00
Ray Greenwell 647a25dfdc Even better: have the base PeerManager call clientLoggedOn and clientLoggedOff
for every client on another node when it connects or disconnects from that node.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5696 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 23:10:02 +00:00
Ray Greenwell 4a5136d3f0 Bugfix: chat bug.
If node A started up and connected to node B, which already had players logged on,
then nobody on A could send chat to anyone on B.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5695 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 22:56:29 +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 a419ed8455 Support for broadcasting with either a custom attention level
(for system messages), or a custom mode (for user broadcasts).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5693 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-25 21:23:32 +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
Charlie Groves 0da49cb6ab Uhh, might want to handle PresentsSession.getInetAddress returning null for disconnected clients
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5687 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-18 20:14:15 +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
Charlie Groves 45999ffdc2 Pull bundle loading out into a method so subclasses can have their way with it
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5685 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-13 21:49:37 +00:00
Michael Bayne dec9e7ee70 Execute clearClientInfo() in a transaction on NodeObject so that when derived
classes naturally remove extra crap from the NodeObject as a result of the
client departing this node, it all goes out in a single event. Cross-server
traffic-- go!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5684 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-11 19:27:33 +00:00
Michael Bayne 4a7cb2c82f Rethink! Instead of hacking up the peer ClientInfo system for the one thing
that actually needs to look clients up by visible name (chat forwarding), we'll
just leave things as is (as in mapped by auth username) and take care of our
own shit in ClientPeerManager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5683 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-11 17:47:35 +00:00
Charlie Groves 8f05b41c6a Add getSessionsForAddress to return all the active sessions for a given IP address.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5682 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-06 21:29:01 +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
Michael Bayne 5bd1ef9d8c Use new isTainted and untaint methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5680 542714f4-19e9-0310-aa3c-eee0fc999fb1
2009-03-05 01:22:49 +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