Class/Object

PacketCodingActor

Related Docs: object PacketCodingActor | package root

Permalink

class PacketCodingActor extends Actor with MDCContextAware

In between the network side and the higher functioning side of the simulation: accept packets and transform them into a sequence of data (encoding), and accept a sequence of data and transform it into s packet (decoding).

Following the standardization of the SessionRouter pipeline, the throughput of this Actor has directionality. The "network," where the encoded data comes and goes, is assumed to be leftRef. The "simulation", where the decoded packets come and go, is assumed to be rightRef. rightRef can accept a sequence that looks like encoded data but it will merely pass out the same sequence. Likewise, leftRef accepts decoded packets but merely ejects the same packets without doing any work on them. The former functionality is anticipated. The latter functionality is deprecated.

Encoded data leaving the Actor (leftRef) is limited by an upper bound capacity. Sequences can not be larger than that bound or else they will be dropped. This maximum transmission unit (MTU) is used to divide the encoded sequence into chunks of encoded data, re-packaged into nested ControlPacket units, and each unit encoded. The outer packaging is numerically consistent with a subslot that starts counting once the simulation starts. The client is very specific about the subslot number and will reject out-of-order packets. It resets to 0 each time this Actor starts up and the client reflects this functionality.

Source
PacketCodingActor.scala
Linear Supertypes
MDCContextAware, ActorLogging, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PacketCodingActor
  2. MDCContextAware
  3. ActorLogging
  4. Actor
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PacketCodingActor()

    Permalink

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to any2stringadd[PacketCodingActor] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (PacketCodingActor, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to ArrowAssoc[PacketCodingActor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def AddSlottedPacketToLog(subslot: Int, packet: ByteVector): Unit

    Permalink
  7. def Established: Receive

    Permalink
  8. def Initializing: Receive

    Permalink
  9. def Subslot: Int

    Permalink

    Retrieve the current subslot number.

    Retrieve the current subslot number. Increment the subslot for the next time it is needed.

    returns

    a 16u number starting at 0

  10. def UnmarshalInnerPacket(data: ByteVector, description: String): Unit

    Permalink

    Transform data into a container packet and re-submit that container to the process that handles the packet.

    Transform data into a container packet and re-submit that container to the process that handles the packet.

    data

    the packet data

    description

    an explanation of the input data

  11. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  12. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  13. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  14. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  15. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    MDCContextAware → Actor
  16. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  19. def ensuring(cond: (PacketCodingActor) ⇒ Boolean, msg: ⇒ Any): PacketCodingActor

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to Ensuring[PacketCodingActor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (PacketCodingActor) ⇒ Boolean): PacketCodingActor

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to Ensuring[PacketCodingActor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): PacketCodingActor

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to Ensuring[PacketCodingActor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): PacketCodingActor

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to Ensuring[PacketCodingActor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to StringFormat[PacketCodingActor] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  27. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  28. def handleBundlePacket(data: ByteVector): Unit

    Permalink

    Accept ByteVector data and package it into a SlottedMetaPacket.

    Accept ByteVector data and package it into a SlottedMetaPacket. Send it (towards the network) upon successful encoding.

    data

    an encoded packet

  29. def handleBundlePacket(vec: Vector[ByteVector]): Unit

    Permalink

    Accept a Vector of encoded packets and re-package them.

    Accept a Vector of encoded packets and re-package them. The normal order is to package the elements of the vector into a MultiPacketEx. If the vector only has one element, it will get packaged by itself in a SlottedMetaPacket. If that one element risks being too big for the MTU, however, it will be handled off to be split. Splitting should preserve Subslot ordering with the rest of the bundling.

    vec

    a specific number of byte streams

  30. def handleBundlePacket(bundle: List[PlanetSidePacket]): Unit

    Permalink

    Accept a List of packets and sequentially re-package the elements from the list into multiple container packets.

    The original packets are encoded then paired with their encoding lengths plus extra space to prefix the length.

    Accept a List of packets and sequentially re-package the elements from the list into multiple container packets.

    The original packets are encoded then paired with their encoding lengths plus extra space to prefix the length. Encodings from these pairs are drawn from the list until into buckets that fit a maximum byte stream length. The size limitation on any bucket is the MTU limit. less by the base sizes of MultiPacketEx (2) and of SlottedMetaPacket (4).

    bundle

    the packets to be bundled

  31. def handleControlPacket(container: PlanetSidePacketContainer, packet: PlanetSideControlPacket): Unit

    Permalink

    Process a control packet or determine that it does not need to be processed at this level.

    Process a control packet or determine that it does not need to be processed at this level. Primarily, if the packet is of a type that contains another packet that needs be be unmarshalled, that/those packet must be unwound.

    The subslot information is used to identify these nested packets after arriving at their destination, to establish order for sequential packets and relation between divided packets.

    container

    the original container packet

    packet

    the packet that was extracted from the container

  32. def handlePacketContainer(container: PlanetSidePacketContainer): Unit

    Permalink

    Sort and redirect a container packet bound for the server by type of contents.

    Sort and redirect a container packet bound for the server by type of contents. GamePacket objects can just onwards without issue. ControlPacket objects may need to be dequeued. All other container types are invalid.

    container

    the container packet

  33. def handleSplitPacket(data: ByteVector): Unit

    Permalink

    Accept ByteVector data, representing a ControlPacket, and split it into chunks.

    Accept ByteVector data, representing a ControlPacket, and split it into chunks. The chunks should not be blocked by the MTU. Send each chunk (towards the network) as it is converted.

    data

    ByteVector data to be split

  34. def handleSplitPacket(cont: ControlPacket): Unit

    Permalink

    Transform a ControlPacket into ByteVector data for splitting.

    Transform a ControlPacket into ByteVector data for splitting.

    cont

    the original ControlPacket

  35. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  38. def mtuLimit(msg: ByteVector): Unit

    Permalink

    Check that an outbound packet is not too big to get stuck by the MTU.

    Check that an outbound packet is not too big to get stuck by the MTU. If it is larger than the MTU, divide it up and re-package the sections. Otherwise, send the data out like normal.

    msg

    the encoded packet data

  39. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  43. def postStop(): Unit

    Permalink
    Definition Classes
    PacketCodingActor → Actor
  44. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  45. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  46. def receive: Receive

    Permalink
    Definition Classes
    PacketCodingActor → Actor
  47. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  48. def sendResponseLeft(cont: ByteVector): Unit

    Permalink

    Encoded sequence of data going towards the network.

    Encoded sequence of data going towards the network.

    cont

    the data

  49. def sendResponseRight(cont: PlanetSidePacketContainer): Unit

    Permalink

    Decoded packet going towards the simulation.

    Decoded packet going towards the simulation.

    cont

    the packet

  50. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  51. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  55. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def [B](y: B): (PacketCodingActor, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from PacketCodingActor to ArrowAssoc[PacketCodingActor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from MDCContextAware

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from PacketCodingActor to any2stringadd[PacketCodingActor]

Inherited by implicit conversion StringFormat from PacketCodingActor to StringFormat[PacketCodingActor]

Inherited by implicit conversion Ensuring from PacketCodingActor to Ensuring[PacketCodingActor]

Inherited by implicit conversion ArrowAssoc from PacketCodingActor to ArrowAssoc[PacketCodingActor]

Ungrouped