package com.rosetta.messenger.network

/**
 * Request Transport packet (ID: 0x0F)
 * Запрос адреса транспортного сервера для загрузки/скачивания файлов
 */
class PacketRequestTransport : Packet() {
    var transportServer: String = ""

    override fun getPacketId(): Int = 0x0F

    override fun receive(stream: Stream) {
        transportServer = stream.readString()
    }

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