Added readLong and writeLong to our streaming classes.

Use that in PongResponse.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5358 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2008-09-04 22:21:03 +00:00
parent 6179c74b29
commit 76ebba1614
3 changed files with 15 additions and 4 deletions
@@ -29,6 +29,7 @@ import flash.utils.IDataInput;
import com.threerings.util.ClassUtil;
import com.threerings.util.Log;
import com.threerings.util.Long;
public class ObjectInputStream
{
@@ -209,6 +210,13 @@ public class ObjectInputStream
return _source.readFloat();
}
public function readLong () :Long
{
const result :Long = new Long();
readBareObject(result);
return result;
}
public function readInt () :int
//throws IOError
{
@@ -27,6 +27,7 @@ import flash.utils.IDataOutput;
import com.threerings.util.ClassUtil;
import com.threerings.util.HashMap;
import com.threerings.util.Log;
import com.threerings.util.Long;
import com.threerings.util.Short;
public class ObjectOutputStream
@@ -164,6 +165,11 @@ public class ObjectOutputStream
_targ.writeFloat(value);
}
public function writeLong (value :Long) :void
{
writeBareObject(value);
}
public function writeInt (value :int) :void
//throws IOError
{
@@ -56,10 +56,7 @@ public class PongResponse extends DownstreamMessage
_unpackStamp = getTimer();
super.readObject(ins);
// TODO: Figure out how we're really going to cope with longs
_packStamp = new Long();
ins.readBareObject(_packStamp);
_packStamp = ins.readLong();
_processDelay = ins.readInt();
}