Package soc.qase.com.packet

Examples of soc.qase.com.packet.ClientPacket


*  it contains and reacting accordingly. See the following methods
for a list of all valid message types. */
/*-------------------------------------------------------------------*/
  protected void processServerPacket(ServerPacket packet)
  {
    ClientPacket clientPacket = null;
    Message message = null;

    message = packet.getMessage();

    try
View Full Code Here


/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
  private byte[] processIncomingPacket(byte[] data)
  {
    ClientPacket currentPacket;
    Sequence sequenceOne = null;
    Sequence sequenceTwo = null;
    int length = 0;

    sequenceOne = new Sequence(data);
View Full Code Here

*  recording the current game session; used by QASE when recording
*  multi-map demos*/
/*-------------------------------------------------------------------*/
  public synchronized void disconnect(boolean stopRecording)
  {
    ClientPacket packet = null;
    ClientCommand message = null;

    if(dm2Recorder.isRecording() && stopRecording)
      dm2Recorder.stopRecording();

    if(connected)
    {
      inGame = false;
      message = new ClientCommand(clientID, "disconnect");
      packet = new ClientPacket(message);
      communicator.sendUnreliable(packet);
      communicator.disconnect();
      connected = false;
    }
  }
View Full Code Here

*  Called by sendCommand and sendConsoleCommand.
@param command the command to send to the server */
/*-------------------------------------------------------------------*/
  protected ClientPacket buildCommandPacket(String command)
  {
    return new ClientPacket(new ClientCommand(clientID, command));
  }
View Full Code Here

*  to enter a game session.*/
/*-------------------------------------------------------------------*/
  private void sendBegin()
  {
    String command = null;
    ClientPacket packet = null;
    ClientCommand message = null;

    message = new ClientCommand(clientID, "begin " + server.getLevelKey());
    packet = new ClientPacket(message);
    communicator.sendReliable(packet);
  }
View Full Code Here

*  actually performs the transmission of the client's desired move.
@see #sendMovement(Angles, Velocity, Action) */
/*-------------------------------------------------------------------*/
  private void sendMove()
  {
    ClientPacket packet = null;
    ClientMove message = null;
   
    lastMove = previousMove;
    previousMove = currentMove;
    currentMove = new Move(angles, velocity, action, communicator.getPing());
    message = new ClientMove(clientID, world.getFrame(), currentMove, previousMove, lastMove, communicator.getNextSequence());
    packet = new ClientPacket(message);
    communicator.sendUnreliable(packet);
  }
View Full Code Here

TOP

Related Classes of soc.qase.com.packet.ClientPacket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.