Commented a few classes as abstract,
debugging.. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3878 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -76,7 +76,7 @@ public class ClientDObjectMgr
|
|||||||
_flushInterval.addEventListener(TimerEvent.TIMER, flushObjects);
|
_flushInterval.addEventListener(TimerEvent.TIMER, flushObjects);
|
||||||
_flushInterval.start();
|
_flushInterval.start();
|
||||||
|
|
||||||
_actionInterval = new Timer(1); //TODO!
|
_actionInterval = new Timer(500); //TODO!
|
||||||
_actionInterval.addEventListener(TimerEvent.TIMER, processNextAction);
|
_actionInterval.addEventListener(TimerEvent.TIMER, processNextAction);
|
||||||
_actionInterval.start();
|
_actionInterval.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import flash.net.Socket;
|
|||||||
import flash.util.ByteArray;
|
import flash.util.ByteArray;
|
||||||
import flash.util.Endian;
|
import flash.util.Endian;
|
||||||
|
|
||||||
|
import com.threerings.util.Util;
|
||||||
|
|
||||||
import com.threerings.io.FrameAvailableEvent;
|
import com.threerings.io.FrameAvailableEvent;
|
||||||
import com.threerings.io.FrameReader;
|
import com.threerings.io.FrameReader;
|
||||||
import com.threerings.io.ObjectInputStream;
|
import com.threerings.io.ObjectInputStream;
|
||||||
@@ -90,6 +92,8 @@ public class Communicator
|
|||||||
// write the message (ends up in _outBuffer)
|
// write the message (ends up in _outBuffer)
|
||||||
_outStream.writeObject(msg);
|
_outStream.writeObject(msg);
|
||||||
|
|
||||||
|
trace("outBuffer: " + Util.bytesToString(_outBuffer));
|
||||||
|
|
||||||
// frame it by writing the length, then the bytes
|
// frame it by writing the length, then the bytes
|
||||||
_socket.writeInt(_outBuffer.length);
|
_socket.writeInt(_outBuffer.length);
|
||||||
_socket.writeBytes(_outBuffer);
|
_socket.writeBytes(_outBuffer);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.threerings.io.Streamable;
|
|||||||
|
|
||||||
import com.threerings.util.Comparable;
|
import com.threerings.util.Comparable;
|
||||||
|
|
||||||
public class DEvent
|
public /* abstract */ class DEvent
|
||||||
implements Streamable
|
implements Streamable
|
||||||
{
|
{
|
||||||
public function DEvent (targetOid :int)
|
public function DEvent (targetOid :int)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.threerings.io.ObjectOutputStream;
|
|||||||
* A common parent class for all events that are associated with a name
|
* A common parent class for all events that are associated with a name
|
||||||
* (in some cases a field name, in other cases just an identifying name).
|
* (in some cases a field name, in other cases just an identifying name).
|
||||||
*/
|
*/
|
||||||
public class NamedEvent extends DEvent
|
public /* abstract */ class NamedEvent extends DEvent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructs a new named event for the specified target object with
|
* Constructs a new named event for the specified target object with
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.threerings.io.ObjectInputStream;
|
|||||||
import com.threerings.io.ObjectOutputStream;
|
import com.threerings.io.ObjectOutputStream;
|
||||||
import com.threerings.io.Streamable;
|
import com.threerings.io.Streamable;
|
||||||
|
|
||||||
public class Credentials
|
public /* abstract */ class Credentials
|
||||||
implements Streamable
|
implements Streamable
|
||||||
{
|
{
|
||||||
public function Credentials (username :Name)
|
public function Credentials (username :Name)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.threerings.io.ObjectInputStream;
|
|||||||
import com.threerings.io.ObjectOutputStream;
|
import com.threerings.io.ObjectOutputStream;
|
||||||
import com.threerings.io.Streamable;
|
import com.threerings.io.Streamable;
|
||||||
|
|
||||||
public class DownstreamMessage
|
public /* abstract */ class DownstreamMessage
|
||||||
implements Streamable
|
implements Streamable
|
||||||
{
|
{
|
||||||
/** The message id of the upstream message with which this downstream
|
/** The message id of the upstream message with which this downstream
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.threerings.io.ObjectOutputStream;
|
|||||||
|
|
||||||
import com.threerings.util.JavaConstants;
|
import com.threerings.util.JavaConstants;
|
||||||
|
|
||||||
public class UpstreamMessage
|
public /* abstract */ class UpstreamMessage
|
||||||
implements Streamable
|
implements Streamable
|
||||||
{
|
{
|
||||||
/** This is a unique (within the context of a reasonable period
|
/** This is a unique (within the context of a reasonable period
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.threerings.util {
|
||||||
|
|
||||||
|
import flash.util.ByteArray;
|
||||||
|
import flash.util.StringBuilder;
|
||||||
|
|
||||||
|
public class Util
|
||||||
|
{
|
||||||
|
public static function bytesToString (bytes :ByteArray) :String
|
||||||
|
{
|
||||||
|
var buf :StringBuilder = new StringBuilder();
|
||||||
|
for (var ii :int = 0; ii < bytes.length; ii++) {
|
||||||
|
var b :int = bytes[ii];
|
||||||
|
buf.append(HEX[b >> 4], HEX[b & 0xF]);
|
||||||
|
}
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static const HEX :Array = new Array("0", "1", "2", "3", "4", "5",
|
||||||
|
"6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user