com.threerings.tudey.server
Class ClientLiaison

java.lang.Object
  extended by com.threerings.tudey.server.ClientLiaison

public class ClientLiaison
extends Object

Handles interaction with a single client.


Constructor Summary
ClientLiaison(TudeySceneManager scenemgr, com.threerings.crowd.data.BodyObject bodyobj, com.threerings.crowd.server.CrowdSession session)
          Creates a new liaison for the specified client.
 
Method Summary
 void bodyUpdated(com.threerings.crowd.data.OccupantInfo info)
          Notes that the client's occupant info has been updated.
 void enqueueInput(int acknowledge, int ping, InputFrame[] frames)
          Processes a request to enqueue input received from a client.
 void enteredPlace()
          Notes that the client has successfully entered the place.
 int getControlDelta()
          Computes and returns the difference between the time at which the client depicts actors that it controls (its advanced time) and the time at which it depicts all other actors (its delayed time).
 int getLastInput()
          Returns the timestamp of the last input frame received from the client (or zero if none have yet been received).
 PawnLogic getTarget()
          Returns a reference to the client's target.
 void postDelta()
          Posts the scene delta for this client, informing it any all relevant changes to the scene since its last acknowledged delta.
 void setCameraParams(CameraConfig config, float aspect)
          Sets the client's camera parameters.
 void setTarget(PawnLogic target)
          Sets the client's target actor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientLiaison

public ClientLiaison(TudeySceneManager scenemgr,
                     com.threerings.crowd.data.BodyObject bodyobj,
                     com.threerings.crowd.server.CrowdSession session)
Creates a new liaison for the specified client.

Method Detail

bodyUpdated

public void bodyUpdated(com.threerings.crowd.data.OccupantInfo info)
Notes that the client's occupant info has been updated.


setTarget

public void setTarget(PawnLogic target)
Sets the client's target actor.


getTarget

public PawnLogic getTarget()
Returns a reference to the client's target.


setCameraParams

public void setCameraParams(CameraConfig config,
                            float aspect)
Sets the client's camera parameters.


getControlDelta

public int getControlDelta()
Computes and returns the difference between the time at which the client depicts actors that it controls (its advanced time) and the time at which it depicts all other actors (its delayed time).


getLastInput

public int getLastInput()
Returns the timestamp of the last input frame received from the client (or zero if none have yet been received).


enteredPlace

public void enteredPlace()
Notes that the client has successfully entered the place.


enqueueInput

public void enqueueInput(int acknowledge,
                         int ping,
                         InputFrame[] frames)
Processes a request to enqueue input received from a client.

Parameters:
ping - the ping calculated from the current time and the client's time estimate.

postDelta

public void postDelta()
Posts the scene delta for this client, informing it any all relevant changes to the scene since its last acknowledged delta.



Copyright © 2011. All Rights Reserved.