async-call-rpc

A lightweight JSON RPC client & server

Home > async-call-rpc > CallbackBasedChannel

CallbackBasedChannel interface

This interface represents a “callback” model.

Signature:

export interface CallbackBasedChannel<Data = unknown> extends Partial<EventBasedChannel<Data>> 

Extends: Partial<EventBasedChannel<Data>>

Remarks

Usually used for there are many remotes (act like a server). Example: Example for CallbackBasedChannel

Methods

Method Description
setup(jsonRPCHandlerCallback, isValidJSONRPCPayload) Setup the CallbackBasedChannel.