Create advance session management and reaping

This commit is contained in:
Chord 2016-07-30 21:08:40 -04:00
parent c1257cb1ec
commit ae6687c38f
10 changed files with 301 additions and 84 deletions

View file

@ -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
}
}
}
}