More streaming fixups.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4106 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-10 02:35:01 +00:00
parent b82108ecea
commit fe3350dc3c
11 changed files with 46 additions and 65 deletions
@@ -2,6 +2,7 @@ package com.threerings.presents.dobj {
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.TypedArray;
import com.threerings.util.StringBuilder;
@@ -26,7 +27,8 @@ public class MessageEvent extends NamedEvent
* @param args the arguments for this message. This array should
* contain only values of valid distributed object types.
*/
public function MessageEvent (targetOid :int, name :String, args :Array)
public function MessageEvent (
targetOid :int = 0, name :String = null, args :Array = null)
{
super(targetOid, name);
_args = args;
@@ -76,6 +78,20 @@ public class MessageEvent extends NamedEvent
buf.append(", args=", _args);
}
// documentation inherited
public override function writeObject (out :ObjectOutputStream) :void
{
super.writeObject(out);
out.writeField(_args);
}
// documentation inherited
public override function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_args = (ins.readField(Array) as Array);
}
protected var _args :Array;
}
}