mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-22 08:03:34 +00:00
Create advance session management and reaping
This commit is contained in:
parent
c1257cb1ec
commit
ae6687c38f
10 changed files with 301 additions and 84 deletions
|
|
@ -167,5 +167,24 @@ class ControlPacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
"TeardownConnection" should {
|
||||
val string = hex"00 05 02 4F 57 17 00 06"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case TeardownConnection(nonce) =>
|
||||
nonce mustEqual 391597826
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val encoded = PacketCoding.EncodePacket(TeardownConnection(391597826)).require
|
||||
|
||||
encoded.toByteVector mustEqual string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue