diff --git a/src/as/com/threerings/io/ObjectInputStream.as b/src/as/com/threerings/io/ObjectInputStream.as index 366500e14..1c75fdd26 100644 --- a/src/as/com/threerings/io/ObjectInputStream.as +++ b/src/as/com/threerings/io/ObjectInputStream.as @@ -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 { diff --git a/src/as/com/threerings/io/ObjectOutputStream.as b/src/as/com/threerings/io/ObjectOutputStream.as index 85a38ec22..ff9de0ae4 100644 --- a/src/as/com/threerings/io/ObjectOutputStream.as +++ b/src/as/com/threerings/io/ObjectOutputStream.as @@ -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 { diff --git a/src/as/com/threerings/presents/net/PongResponse.as b/src/as/com/threerings/presents/net/PongResponse.as index d0fbe8c53..0a5d36ce7 100644 --- a/src/as/com/threerings/presents/net/PongResponse.as +++ b/src/as/com/threerings/presents/net/PongResponse.as @@ -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(); }