Got compiling working under Linux, now correcting various errors.
Checkpoint. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3866 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
package com.threerings.presents.client {
|
||||
|
||||
import flash.util.trace;
|
||||
|
||||
import flash.events.Event;
|
||||
import flash.events.IOErrorEvent;
|
||||
|
||||
import flash.net.Socket;
|
||||
|
||||
import flash.util.ByteArray;
|
||||
@@ -10,6 +15,13 @@ import com.threerings.io.FrameReader;
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
|
||||
import com.threerings.presents.net.AuthRequest;
|
||||
import com.threerings.presents.net.AuthResponse;
|
||||
import com.threerings.presents.net.AuthResponseData;
|
||||
import com.threerings.presents.net.DownstreamMessage;
|
||||
import com.threerings.presents.net.LogoffRequest;
|
||||
import com.threerings.presents.net.UpstreamMessage;
|
||||
|
||||
public class Communicator
|
||||
{
|
||||
public function Communicator (client :Client)
|
||||
@@ -50,6 +62,11 @@ public class Communicator
|
||||
shutdown(null);
|
||||
}
|
||||
|
||||
public function postMessage (msg :UpstreamMessage) :void
|
||||
{
|
||||
sendMessage(msg); // send it now: we have no out queue (TODO?)
|
||||
}
|
||||
|
||||
protected function shutdown (logonError :Error) :void
|
||||
{
|
||||
if (_socket != null) {
|
||||
@@ -132,7 +149,7 @@ public class Communicator
|
||||
|
||||
// logon success
|
||||
_omgr = new ClientDObjectMgr(this, _client);
|
||||
_client._authData = data;
|
||||
_client.setAuthResponseData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -160,17 +177,18 @@ public class Communicator
|
||||
*/
|
||||
protected function socketClosed (event :Event) :void
|
||||
{
|
||||
_client.notifyObserver(ClientEvent.CLIENT_CONNECTION_FAILED);
|
||||
_client.notifyObservers(ClientEvent.CLIENT_CONNECTION_FAILED);
|
||||
shutdown(null);
|
||||
}
|
||||
|
||||
protected var _client :Client;
|
||||
protected var _omgr :ClientDObjectManager;
|
||||
protected var _omgr :ClientDObjectMgr;
|
||||
|
||||
protected var _outBuffer :ByteArray;
|
||||
protected var _outStream :ObjectOutputStream;
|
||||
|
||||
protected var _inStream :ObjectInputStream;
|
||||
protected var _frameReader :FrameReader;
|
||||
|
||||
protected var _socket :Socket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user