Package com.ngt.jopenmetaverse.shared.protocol

Examples of com.ngt.jopenmetaverse.shared.protocol.Packet


      // try generic decoder next which takes a caps event and tries to match it to an existing packet
      if (body.getType().equals(OSDType.Map))
      {
        OSDMap map = (OSDMap)body;
        Packet packet;
        try {
          packet = Packet.BuildPacket(eventName, map);
        } catch (Exception e) {
          JLogger.warn("Error in building packet for event "
        + eventName + Utils.getExceptionStackTraceAsString(e));
View Full Code Here


  }

  private void IncomingPacketHandler()
  {
    IncomingPacket incomingPacket = new IncomingPacket();
    Packet packet = null;
    Simulator simulator = null;

    while (connected)
    {
      // Reset packet to null for the check below
View Full Code Here

  /// <param name="e">The EventArgs object containing the packet data</param>
  private void ScriptControlChangeHandler(Object sender, PacketReceivedEventArgs e)
  {
    if (onOnScriptControlChange != null)
    {
      Packet packet = e.getPacket();

      ScriptControlChangePacket change = (ScriptControlChangePacket)packet;
      for (int i = 0; i < change.Data.length; i++)
      {
        onOnScriptControlChange.raiseEvent(new ScriptControlEventArgs(ScriptControlChange.get(change.Data[i].Controls),
View Full Code Here

  protected void LoadURLHandler(Object sender, PacketReceivedEventArgs e) throws UnsupportedEncodingException
  {

    if (onLoadURL != null)
    {
      Packet packet = e.getPacket();

      LoadURLPacket loadURL = (LoadURLPacket)packet;

      onLoadURL.raiseEvent(new LoadUrlEventArgs(
          Utils.bytesWithTrailingNullByteToString(loadURL.Data.ObjectName),
View Full Code Here

  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  /// <remarks>This occurs when after an avatar moves into a new sim</remarks>
  private void MovementCompleteHandler(Object sender, PacketReceivedEventArgs e) throws UnsupportedEncodingException
  {
    Packet packet = e.getPacket();
    Simulator simulator = e.getSimulator();

    AgentMovementCompletePacket movement = (AgentMovementCompletePacket)packet;

    relativePosition = movement.Data.Position;
View Full Code Here

  /// <summary>Process an incoming packet and raise the appropriate events</summary>
  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  protected void HealthHandler(Object sender, PacketReceivedEventArgs e)
  {
    Packet packet = e.getPacket();
    health = ((HealthMessagePacket)packet).HealthData.Health;
  }
View Full Code Here

  /// <summary>Process an incoming packet and raise the appropriate events</summary>
  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  protected void AgentDataUpdateHandler(Object sender, PacketReceivedEventArgs e) throws UnsupportedEncodingException
  {
    Packet packet = e.getPacket();
    Simulator simulator = e.getSimulator();

    AgentDataUpdatePacket p = (AgentDataUpdatePacket)packet;

    if (p.AgentData.AgentID.equals(simulator.Client.self.getAgentID()))
View Full Code Here

  /// <summary>Process an incoming packet and raise the appropriate events</summary>
  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  protected void MoneyBalanceReplyHandler(Object sender, PacketReceivedEventArgs e) throws UnsupportedEncodingException
  {
    Packet packet = e.getPacket();

    if (packet.Type == PacketType.MoneyBalanceReply)
    {
      MoneyBalanceReplyPacket reply = (MoneyBalanceReplyPacket)packet;
      this.balance = reply.MoneyData.MoneyBalance;
View Full Code Here

  /// <summary>Process an incoming packet and raise the appropriate events</summary>
  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  protected void TeleportHandler(Object sender, PacketReceivedEventArgs e) throws UnknownHostException, Exception
  {
    Packet packet = e.getPacket();
    Simulator simulator = e.getSimulator();

    boolean finished = false;
    EnumSet<TeleportFlags> flags = TeleportFlags.get(TeleportFlags.Default.getIndex());
View Full Code Here

  /// <summary>Process an incoming packet and raise the appropriate events</summary>
  /// <param name="sender">The sender</param>
  /// <param name="e">The EventArgs object containing the packet data</param>
  protected void AvatarAnimationHandler(Object sender, PacketReceivedEventArgs e)
  {
    Packet packet = e.getPacket();
    AvatarAnimationPacket animation = (AvatarAnimationPacket)packet;

    if (animation.Sender.ID.equals(Client.self.getAgentID()))
    {
      synchronized (SignaledAnimations.getDictionary())
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.protocol.Packet

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.