object PacketCoding
- Source
- PacketCoding.scala
- Alphabetic
- By Inheritance
- PacketCoding
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class CryptoCoding(rc5EncryptionKey: Key, rc5DecryptionKey: Key, macEncryptionKey: ByteVector, macDecryptionKey: ByteVector) extends Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val PLANETSIDE_MIN_PACKET_SIZE: Int(1)
A lower bound on the packet size
- val RC5_BLOCK_SIZE: Int
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def decodePacket(msg: ByteVector): Attempt[PlanetSidePacket]
Transforms
ByteVector
data into a PlanetSide packet.Transforms
ByteVector
data into a PlanetSide packet. Similar to theUnmarshalPacket
but it does not process packet headers. It supportsGamePacket
in exchange for not supportingCryptoPacket
(likeUnMarshalPacket
). Mostly used in tests.- msg
raw, unencrypted packet
- returns
PlanetSidePacket
- See also
UnMarshalPacket
- def encodePacket(packet: PlanetSidePacket): Attempt[BitVector]
Transform a
PlanetSidePacket
into itsBitVector
representation.Transform a
PlanetSidePacket
into itsBitVector
representation.- packet
the packet to encode
- returns
a
BitVector
translated from the packet's data
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def marshalPacket(packet: PlanetSidePacket, sequence: Option[Int] = None, crypto: Option[CryptoCoding] = None): Attempt[BitVector]
Transform a kind of packet into the sequence of data that represents it.
Transform a kind of packet into the sequence of data that represents it. Wraps around the encoding process for all valid packet container types.
- packet
the packet to encode
- sequence
the packet's sequence number. Must be set for all non ControlPacket packets (but always for encrypted packets).
- crypto
if set, encrypt final payload
- returns
a
BitVector
translated from the packet's data
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unmarshalPacket(msg: ByteVector, crypto: Option[CryptoCoding] = None, cryptoState: Type = CryptoPacketOpcode.Ignore): Attempt[(PlanetSidePacket, Option[Int])]
Transforms
ByteVector
data into a PlanetSide packet.Transforms
ByteVector
data into a PlanetSide packet. Attempt to decode with an optional header and required payload. Does not decode into aGamePacket
.- msg
the raw packet
- crypto
CryptoCoding instance for packet decryption, if this is a encrypted packet
- cryptoState
the current state of the connection's crypto. This is only used when decoding crypto packets as they do not have opcodes
- returns
PlanetSidePacketContainer
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()