@protobuf-ts/runtime-rpc
Version:
Runtime library for RPC clients generated by the protoc plugin "protobuf-ts"
17 lines (16 loc) • 399 B
TypeScript
/**
* A stream of input messages.
*/
export interface RpcInputStream<T> {
/**
* Send a message down the stream.
* Only one message can be send at a time.
*/
send(message: T): Promise<void>;
/**
* Complete / close the stream.
* Can only be called if there is no pending send().
* No send() should follow this call.
*/
complete(): Promise<void>;
}