Commit Graph

660 Commits

Author SHA1 Message Date
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
Tom Conkling 96ae821e58 ArrayUtil.removeFirstIf(), removeLastIf(), removeAllIf() predicate-based removal functions
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-11 00:22:26 +00:00
Ray Greenwell a9f7175d2f Removed unused import.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5507 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:13:08 +00:00
Ray Greenwell ff20abf27d Fixed parameter reading on Windows.
(We are parsing a URL, and even though it represents a file, it's still
a URL, so it uses the standard slash and not the microsoft slash.)
This will make SDK testing work on Windows.
We suck a lot for not fixing this sooner, but
- I didn't have Windows set up for development.
- It was broken for so long, we deprioritized and then sorta forgot about it.
This has been broken for over 5 months, when I last touched this file
to make it work on Macs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 23:11:49 +00:00
Par Winzell 1a467468ff Don't fill the array with zeroes when we reinitialize the Throttle with the same number of operations as we already had, as that allows a potentially dangerous burst of operations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5505 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 17:17:41 +00:00
Par Winzell bb670e14a8 When we reinitialize the Throttle with a smaller number of allowed operations within a time period, we should preserve the oldest rather than the newest ones, or we'll most likely be in immediate and unfair violation of the limit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5504 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-05 00:21:17 +00:00
Ray Greenwell 2a6940363d Rollback r5502.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5503 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 21:42:18 +00:00
Tom Conkling b9245e9be8 In keeping with Adobe's convention, Set and Map's forEach() function takes an optional 'thisObject' param
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5502 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 20:21:26 +00:00
Par Winzell 4bc5627d82 Let's have Set implement forEach, like Map does.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5500 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 18:21:29 +00:00
Jamie Doornbos 14755a6cea Fixed fundamental flaw with throttling code. Changed the client to adjust its message rate when it actually sends the throttle updated message. Otherwise the client starts sending at the new rate before the server knows about it. Keep the messages per second in the message.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5499 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 08:37:13 +00:00
Jamie Doornbos ed002196b0 Missed a line from the previous change. Added comment for new ArrayUtil method
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5498 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 08:33:05 +00:00
Jamie Doornbos 4633684fb6 Copied code from java implementation of Throttle.reinit(). After testing, I found this method was leaving older values in the middle of younger values
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5497 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-04 06:41:00 +00:00
Jamie Doornbos 0cb3330de7 Refix for long running clients (r5483). I must have introduced this at the last minute when switching my original -32768 to use Short.MIN_VALUE instead, forgetting to remove the negation
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5490 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-03 19:26:57 +00:00
Jamie Doornbos 055ae0cc98 Allow bureau clients to report fatal errors if something goes wrong, like oh I don't know... maybe a disconnection perhaps
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5489 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-11-01 00:31:53 +00:00
Jamie Doornbos ed0718674e Fixed bug with long running clients. The results for invocation requests with ids exceeding Short.MAX_VALUE could not be processed due to the id being deserialized as a short but stored in the map with an integer key.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5483 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-30 17:15:42 +00:00
Jamie Doornbos b9ab203c0c Fixed Throttle bug causing any increase in the number of operations to block all message throughput. Fix prevents copying from negative indices of _ops. This caused a NaN entry which always resulted in an effective age of 0 regardless of getTimer(), causing a permanent state of throttling
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-28 18:00:55 +00:00
Jamie Doornbos d9f5328f1c Fixed recent breakage of actionscript bureaus. Apparently tamarin does not like constant members assigned in a base class? Weird but plausible if it (buggily) sets up all members of a class and assigns defaults values before constructing bases.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5470 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-27 07:54:38 +00:00
Ray Greenwell d9aee80a12 Killed bureau.Log.
We never did things like that in actionscript,
and that pattern is now deprecated on the Java side as well.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5463 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-25 01:36:18 +00:00
Ray Greenwell 5216602e63 Change how we link classes that aren't otherwise linked.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5462 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-25 01:24:13 +00:00
Ray Greenwell 3a457a2479 Muting for actionscript.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5460 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-24 21:20:43 +00:00
Ray Greenwell f8e4911266 Might as well make our actionscript trim() null tolerant as well.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5454 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-23 21:00:08 +00:00
Ray Greenwell a0771dce79 - Added a primitive formatNumber()
- Handle commas in parseNumber()


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5449 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-16 20:54:53 +00:00
Nathan Curtis 24b5b905e1 A couple of example usage fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5442 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-14 21:06:28 +00:00
Jamie Doornbos 077c5e8053 At Ray's suggestion, go ahead and throw an error when the wrong type is read. Use the Type(obj) cast syntax (I was unaware that this would actually throw an error). Reading objects of a basic type like Array must still use "readObject(Array) as Array" so this is still supported, though not needed for user types.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5441 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-13 17:34:55 +00:00
Jamie Doornbos 2b298aa3d5 Pass in the expected type to readObject anywhere the code would clearly convert the wrong type to null anyway
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5440 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-11 06:28:50 +00:00
Jamie Doornbos a3cc67348e Gah, this was part of the implementation, but in the end I took it out but missed the import
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-11 06:21:54 +00:00
Jamie Doornbos e12ff0e9f3 Optional type checking for readObject
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5438 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-11 06:06:06 +00:00
Jamie Doornbos a99238faf8 Fixed username member for actionscript. Serialization was completely hosed
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5437 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-11 05:17:40 +00:00
Michael Bayne a4a25674ce Outgoing message throttle for ActionScript. This uses a timer rather than a
frame listener so that it has a chance of working out of the box on Thane.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5432 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-10 17:27:47 +00:00
Ray Greenwell 19ac92f624 We've got a utility method for filling an array with an initial value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 23:20:29 +00:00
Michael Bayne b7214df1c2 We need our array to be filled with zeros, not undefineds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5429 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 22:08:47 +00:00
Michael Bayne 9f2682a5e4 All of the ActionScript side of adjustable outgoing message rate throttling
except the actual throttling part. Need to think about a good way to do this
without blocking the whole client when we hit the throttle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5428 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-09 20:18:12 +00:00
Jamie Doornbos 3bbd9da353 Fixed spurious warnings about sockets on bureau shut down:
* socketClosed was issuing a warning, presumably because whirled doesn't normally disconnect flash client. Anyway, seems like overkill since the server can disconnect whenever it choosed
* Accoring to adobe, calling Socket.close after the Socket.close event should throw an IOError. Thane holds to this, while flash apparently does not. Make our code neutral by checking for connected prior to calling close

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-07 16:06:45 +00:00
Jamie Doornbos f782ba7f07 Uncommenting log messages (these are very useful for the thane AVRG controller in msoy and can be configured without commenting them out)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-10-03 23:03:23 +00:00
Michael Bayne bb8d04bea0 Tone down verbose logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5404 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-30 21:36:51 +00:00
Ray Greenwell c04adc6a6e Brevify.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 23:54:58 +00:00
Nathan Curtis d4e02b71d8 This is why MultiLoader didn't work in Air. Explanatory comment below.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 23:47:11 +00:00
Jamie Doornbos 59534c1ee6 May as well go totally ISO with date stamp, same as log4j %d
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:21:23 +00:00
Ray Greenwell 46e0585e0a - Oh right, change WARNING to WARN (be more like our Java logging)
- Added an ERROR level, along with an error() method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:11:07 +00:00
Ray Greenwell 7ab2c542da Stop printing square brackets around the log level. Be more like our Java logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 21:04:52 +00:00
Ray Greenwell 38ab9df44a - Print timestamps like Java (with a "," sep'ing seconds and milliseconds)
- when parsing set log levels, accept "warn" as an alias for "warning".


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 20:58:46 +00:00
Ray Greenwell d48921acc2 Added deNull().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-25 20:55:55 +00:00
Jamie Doornbos 233e710d20 Removed extra comma
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-24 17:45:56 +00:00
Tom Conkling 137a5ac2bf FileUtil.getDotSuffix
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-23 00:51:34 +00:00
Michael Bayne cfad184d37 Added an email address validity checker.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-22 18:15:19 +00:00
Michael Bayne e1d83cade0 Make it possible to create and populate a TypedArray in a single expression.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-22 18:15:04 +00:00
Ray Greenwell 004954113d Oh, I like that example I used in the checkin, let's use that in the docs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-19 02:01:17 +00:00
Ray Greenwell a34b08ba34 Do varargs logging just like we do in Java now.
log.info("The message", "key1", value2, "key2", value2, optionalError);


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-19 01:57:52 +00:00
Michael Bayne 278306bb1f A few chat channel related fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-17 23:08:48 +00:00
Michael Bayne 136af2a6b9 Implement equals() with compareTo().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2008-09-16 23:17:59 +00:00