Removed some code that only needs to be on the server-side.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4360 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-09-07 21:31:34 +00:00
parent 0ed50738a9
commit bd306351ee
8 changed files with 13 additions and 64 deletions
@@ -3,6 +3,8 @@ package com.threerings.presents.net {
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.util.StringUtil;
public class AuthRequest extends UpstreamMessage
{
public function AuthRequest (creds :Credentials, version :String)
@@ -16,8 +18,8 @@ public class AuthRequest extends UpstreamMessage
var hoursFromUTC :int = Math.abs(minsOffset) / 60;
var minsFromUTC :int = Math.abs(minsOffset) % 60;
_zone = "GMT" + ((minsOffset < 0) ? "-" : "+") +
((hoursFromUTC < 10) ? "0" : "") + hoursFromUTC + ":" +
((minsFromUTC < 10) ? "0" : "") + minsFromUTC;
StringUtil.prepad(String(hoursFromUTC), 2, "0") + ":" +
StringUtil.prepad(String(minsFromUTC), 2, "0");
}
// documentation inherited
@@ -30,16 +32,6 @@ public class AuthRequest extends UpstreamMessage
out.writeField(_zone);
}
// documentation inherited
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_creds = (ins.readObject() as Credentials);
_version = (ins.readField(String) as String);
_zone = (ins.readField(String) as String);
}
protected var _creds :Credentials;
protected var _version :String;
protected var _zone :String;
@@ -13,11 +13,9 @@ public /* abstract */ class DownstreamMessage
public var messageId :int = -1;
// documentation inherited from interface Streamable
public function writeObject (out :ObjectOutputStream) :void
public final function writeObject (out :ObjectOutputStream) :void
{
Log.getLog(this).warning(
"This is client code: Downstream messages shouldn't be written");
//out.writeShort(messageId);
throw new Error(); // abstract: not needed
}
// documentation inherited from interface Streamable
@@ -50,11 +50,7 @@ public class ForwardEventRequest extends UpstreamMessage
out.writeObject(_event);
}
override public function readObject (ins :ObjectInputStream) :void
{
super.readObject(ins);
_event = (ins.readObject() as DEvent);
}
/** readObject omitted */
public function toString () :String
{
@@ -31,11 +31,9 @@ public /* abstract */ class UpstreamMessage
}
// documentation inherited from interface Streamable
public function readObject (ins :ObjectInputStream) :void
public final function readObject (ins :ObjectInputStream) :void
{
Log.getLog(this).warning(
"This is client code: Upstream messages shouldn't be read");
//messageId = ins.readShort();
throw new Error(); // abstract: not needed
}
/**