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

io.rouz.grpc.examples.chat.ChatServiceStubExt.kt Maven / Gradle / Ivy

There is a newer version: 0.1.4
Show newest version
package io.rouz.grpc.examples.chat

import io.rouz.grpc.*
import io.rouz.grpc.examples.chat.ChatServiceGrpc.ChatServiceStub

import kotlinx.coroutines.channels.ReceiveChannel
import kotlin.coroutines.suspendCoroutine

/**
 * Kotlin extension functions for [io.rouz.grpc.examples.chat.ChatServiceGrpc.ChatServiceStub]
 *
 * Generated by gRPC Kotlin generator
 * Source: chat.proto
 */




fun ChatServiceStub.chat(): ManyToManyCall {
    val responseChannel = StreamObserverChannel()
    val requestObserver = chat(responseChannel)
    return ManyToManyCall(requestObserver, responseChannel)
}



inline suspend fun ChatServiceStub.getNames(request: com.google.protobuf.Empty): io.rouz.grpc.examples.chat.ChatRoom {
    return suspendCoroutine {
        getNames(request, ContinuationStreamObserver(it))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy