mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
Rename and correct packet Unknown30 to ClientHotStart (#1217)
This packet contains the client and server nonce needed to restart a connection using old crypto data.
This commit is contained in:
parent
d1dbbcb08f
commit
8738a42ca0
|
|
@ -308,9 +308,9 @@ class MiddlewareActor(
|
|||
send(ServerStart(nonce, serverNonce), None, None)
|
||||
cryptoSetup()
|
||||
|
||||
case (Unknown30(_), _) =>
|
||||
case (ClientHotStart(_, _), _) =>
|
||||
/*
|
||||
Unknown30 is used to reuse an existing crypto session when switching from login to world
|
||||
ClientHotStart is used to reuse an existing crypto session when switching from login to world
|
||||
When not handling it, it appears that the client will fall back to using ClientStart
|
||||
Do we need to implement this?
|
||||
*/
|
||||
|
|
@ -586,9 +586,9 @@ class MiddlewareActor(
|
|||
case ClientStart(_) =>
|
||||
start()
|
||||
|
||||
case Unknown30(_) =>
|
||||
case ClientHotStart(_, _) =>
|
||||
/*
|
||||
Unknown30 is used to reuse an existing crypto session when switching from login to world
|
||||
ClientHotStart is used to reuse an existing crypto session when switching from login to world
|
||||
When not handling it, it appears that the client will fall back to using ClientStart
|
||||
Do we need to implement this?
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ object ControlPacketOpcode extends Enumeration {
|
|||
Unknown27, //
|
||||
Unknown28, //
|
||||
ConnectionClose, //
|
||||
Unknown30 // Probably a more lightweight variant of ClientStart, containing only the client nonce
|
||||
ClientHotStart // Probably a more lightweight variant of ClientStart, containing only the client nonce
|
||||
= Value
|
||||
|
||||
private def noDecoder(opcode: ControlPacketOpcode.Type) =
|
||||
|
|
@ -90,7 +90,7 @@ object ControlPacketOpcode extends Enumeration {
|
|||
case 0x1b => noDecoder(Unknown27)
|
||||
case 0x1c => noDecoder(Unknown28)
|
||||
case 0x1d => control.ConnectionClose.decode
|
||||
case 0x1e => control.Unknown30.decode
|
||||
case 0x1e => control.ClientHotStart.decode
|
||||
case _ => noDecoder(opcode)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package net.psforever.packet.control
|
||||
|
||||
import net.psforever.packet.{ControlPacketOpcode, Marshallable, PlanetSideControlPacket}
|
||||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
final case class ClientHotStart(clientNonce: Long, ServerNonce: Long) extends PlanetSideControlPacket {
|
||||
type Packet = ClientHotStart
|
||||
def opcode = ControlPacketOpcode.ClientHotStart
|
||||
def encode = ClientHotStart.encode(this)
|
||||
}
|
||||
|
||||
object ClientHotStart extends Marshallable[ClientHotStart] {
|
||||
implicit val codec: Codec[ClientHotStart] = (
|
||||
("client_nonce" | uint32L) ::
|
||||
("server_nonce" | uint32L)
|
||||
).as[ClientHotStart]
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package net.psforever.packet.control
|
||||
|
||||
import net.psforever.packet.{ControlPacketOpcode, Marshallable, PlanetSideControlPacket}
|
||||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
final case class Unknown30(clientNonce: Long) extends PlanetSideControlPacket {
|
||||
type Packet = Unknown30
|
||||
def opcode = ControlPacketOpcode.Unknown30
|
||||
def encode = Unknown30.encode(this)
|
||||
}
|
||||
|
||||
object Unknown30 extends Marshallable[Unknown30] {
|
||||
implicit val codec: Codec[Unknown30] = ("client_nonce" | uint32L).as[Unknown30]
|
||||
}
|
||||
Loading…
Reference in a new issue