async-call-rpc

A lightweight JSON RPC client & server

Home > async-call-rpc > AsyncCallOptions > channel

AsyncCallOptions.channel property

The message channel to exchange messages between server and client

Signature:

channel: CallbackBasedChannel<EncodedRequest | EncodedResponse> | EventBasedChannel<EncodedRequest | EncodedResponse> | Promise<CallbackBasedChannel<EncodedRequest | EncodedResponse> | EventBasedChannel<EncodedRequest | EncodedResponse>>;

Example

Example for CallbackBasedChannel or Example for EventBasedChannel