Rejiggered the way things are handled when using a Client to proxy events from
another server. The PeerManager needs both to rewrite the oid of the events before dispatching them and to assign an eventId to them so that they will not be filtered by PresentsClient when deciding whether or not to send them along to its client. Also fixed compound event dispatch in the process. Now proxy subscribers will be notified once of a compound event rather than of each individual internal event. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4729 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -31,6 +31,8 @@ import com.samskivert.util.RunQueue;
|
||||
import com.threerings.presents.Log;
|
||||
import com.threerings.presents.data.ClientObject;
|
||||
import com.threerings.presents.data.InvocationCodes;
|
||||
import com.threerings.presents.dobj.DEvent;
|
||||
import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.DObjectManager;
|
||||
import com.threerings.presents.net.AuthResponseData;
|
||||
import com.threerings.presents.net.BootstrapData;
|
||||
@@ -483,6 +485,15 @@ public class Client
|
||||
// before turning the client loose to do things like request invocation services
|
||||
}
|
||||
|
||||
/**
|
||||
* If this client is being used to proxy events from another server, this method can be
|
||||
* overridden to adjust the event in any way needed prior to dispatching the event.
|
||||
*/
|
||||
protected void adjustForProxy (DObject target, DEvent event)
|
||||
{
|
||||
// nothing by default
|
||||
}
|
||||
|
||||
/**
|
||||
* Called every five seconds; ensures that we ping the server if we haven't communicated in a
|
||||
* long while and periodically resyncs the client and server clock deltas.
|
||||
|
||||
Reference in New Issue
Block a user