All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.dev.datlag.kast.Channel.kt Maven / Gradle / Ivy

There is a newer version: 0.2.1
Show newest version
package dev.datlag.kast

import dev.datlag.kast.proto.CastMessage
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.encodeToHexString
import kotlinx.serialization.protobuf.ProtoBuf

@OptIn(ExperimentalSerializationApi::class)
class Channel {

    init {
        println(protobuf.encodeToHexString(
            CastMessage(
                protocolVersion = CastMessage.ProtocolVersion.CASTV2_1_0,
                sourceId = "sourceId",
                destinationId = "destinationId",
                namespace = "namespace",
                payloadType = CastMessage.PayloadType.STRING,
                payloadUtf8 = "payloadData"
            )
        ))
    }

    companion object {
        val protobuf = ProtoBuf { }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy