package com.rosetta.messenger.network


class PacketTyping : Packet() {
    var privateKey: String = ""
    var fromPublicKey: String = ""
    var toPublicKey: String = ""

    override fun getPacketId(): Int = 0x0B

    override fun receive(stream: Stream) {
        privateKey = stream.readString()
        fromPublicKey = stream.readString()
        toPublicKey = stream.readString()
    }

    override fun send(): Stream {
        val stream = Stream()
        stream.writeInt16(getPacketId())
        stream.writeString(privateKey)
        stream.writeString(fromPublicKey)
        stream.writeString(toPublicKey)
        return stream
    }
}
