import Foundation

/// UserInfo packet (0x01) — get/set user profile information.
/// Field order matches Desktop: username, title, privateKey.
struct PacketUserInfo: Packet {
    static let packetId = 0x01

    var username: String = ""
    var title: String = ""
    var privateKey: String = ""

    func write(to stream: Stream) {
        stream.writeString(username)
        stream.writeString(title)
        stream.writeString(privateKey)
    }

    mutating func read(from stream: Stream) {
        username = stream.readString()
        title = stream.readString()
        privateKey = stream.readString()
    }
}
