# PSF-LoginServer - master - net.psforever.actors.net.MiddlewareActor.Raw
PSF - LoginServer - master - net.psforever.actors.net.MiddlewareActor.Raw
Keywords: PSF LoginServer master net.psforever.actors.net.MiddlewareActor.Raw

PSF-LoginServer - master < Back


# Packages

-  package root
  Definition Classes
    root
-  package net
  Definition Classes
    root
-  package psforever
  Definition Classes
    net
-  package actors
  Definition Classes
    psforever
-  package net
  Definition Classes
    actors
-  object MiddlewareActor

  `MiddlewareActor` sits between the raw UDP socket and the "main" actors (either `LoginActor` or `SessionActor`) and handles crypto and control packets.

  `MiddlewareActor` sits between the raw UDP socket and the "main" actors (either `LoginActor` or `SessionActor`) and handles crypto and control packets. The former side is called the outbound network (the clients); the former is called the inbound local (server). This service sets up cryptography, it decodes incoming packets, it encodes, bundles, or splits outgoing packets, and it handles things like requesting/resending lost packets. Accurate operation of the service is mostly a product of the network being agreeable and allowing packets to arrive correctly. Various subroutines are used to keep track of the predicted offending packets.
  The cryptographic aspect of the service resolves itself first, exchanging keys and passcodes and challeneges between local and the network. Most of this process occurs without any prior cryptographic setup, relying on the validation of its own exchange to operate. Afterwards its completion, all raw data arriving from the network or leaving to the network will require a cipher based on the previously exchanged data.
  As packets arrive from local with the intention of being sent out towards the network terminus, they will be pooled into a buffer. Periodically, the buffer contents will be evaluated, and packet data of enough quantity and combined length will be assembled into a singular packet bundle. This bundle will be queued and dispatched towards the network. If the outbound packets do not arrive at the network terminus correctly, the network has a method of dispatching requests for identified missing packets. This side of the communication will keep track of its previously dispatched packets for a "reasonable" amount of time and will respond to those requests if possible by searching its catalog.
  If the inbound packets do not arrive correctly the first time, after a while, requests for identified mising packets from the network source will occur. Virtually all important packets have a sequence number that bestows on each packet an absolute delivery order. Bundled packets have a subslot number that indicates the total number of subslot packets dispatched to this client as well as the order in which the packets should have been received. If a packet is out of sequence - a future packet, compared to what is being expected - it is buffered. Should the expected packets show up out of order before the buffered is cleared, everything sorts itself out. Unresolved missing sequence entries will often lead to requests for missing packets with anticipated subslots. If these requests do not resolve, there is unfortuantely not much that can be done except grin and bear with it.

  Definition Classes
    net
- Close
- Command
- Raw
- Receive
- Send
- Teardown

o

net.psforever.actors.net.MiddlewareActor

# Raw 

###
Companion class Raw

#### object Raw extends Serializable

Source
  MiddlewareActor.scala

Linear Supertypes
Serializable, AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Raw
2. Serializable
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def apply(msg: ByteVector, exclusive: Boolean): Raw
5.  def apply(msg: ByteVector): Raw
6.  def apply(msg: BitVector): Raw
7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @native()
9.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
10.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
11.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
12.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
13.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
14.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
15.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
16.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
17.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
18.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
19.  def toString(): String
    Definition Classes
      AnyRef → Any
20.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
21.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
22.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()

### Inherited from Serializable

### Inherited from AnyRef

### Inherited from Any

### Ungrouped