Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 2.27 KB

async-call-rpc.md

File metadata and controls

47 lines (33 loc) · 2.27 KB

Home > async-call-rpc

async-call-rpc package

A light implementation of JSON RPC 2.0

Remarks

See the introduction at Github

Functions

Function Description
AsyncCall(thisSideImplementation, options) Create a RPC server & client.
AsyncGeneratorCall(thisSideImplementation, options) The async generator version of the AsyncCall
batch(asyncCallInstance) Wrap the AsyncCall instance to use batch call.
notify(instanceOrFnOnInstance) Wrap the AsyncCall instance to send notification.

Interfaces

Interface Description
AsyncCallLogLevel What should AsyncCall log to console.
AsyncCallOptions Options for AsyncCall()
AsyncCallStrictJSONRPC Control the behavior that different from the JSON RPC spec.
CallbackBasedChannel This interface represents a "callback" model.
Console The minimal Console interface that AsyncCall needs.
EventBasedChannel This interface represents a "on message"-"send response" model.
MessageChannel The message channel interface that allows
Serialization Serialization and deserialization of the JSON RPC payload

Variables

Variable Description
JSONSerialization Create a serialization by JSON.parse/stringify
NoSerialization Serialization implementation that do nothing

Type Aliases

Type Alias Description
ErrorMapFunction