import Foundation

/// Transport server request/response packet (0x0F).
/// Desktop parity: `packet.requesttransport.ts`.
///
/// Client sends empty packet to request transport server URL.
/// Server responds with the URL for file upload/download.
struct PacketRequestTransport: Packet {
    static let packetId = 0x0F

    var transportServer: String = ""

    func write(to stream: Stream) {
        stream.writeString(transportServer)
    }

    mutating func read(from stream: Stream) {
        transportServer = stream.readString()
    }
}
