onClose

Available in a dev version: 0․11․0-grpc-186

How to configure

abstract fun onClose(block: (GrpcStatus, GrpcMetadata) -> Unit)(source)

Register a callback invoked when the call is closed (successfully or exceptionally). Provides the final kotlinx.rpc.grpc.GrpcStatus and the sent GrpcMetadata trailers.

IMPORTANT: The callback must not throw an exception or use close. Behavior is undefined and may lead to crashes depending on the platform.