A lightweight JSON RPC client & server
Home > async-call-rpc > EventBasedChannel
This interface represents a “on message” - “send response” model.
Signature:
export interface EventBasedChannel<Data = unknown>
Usually used for there is only 1 remote (act like a client). Example: Example for EventBasedChannel
Method | Description |
---|---|
on(listener) | Register the message listener. |
send(data) | Send the data to the remote side. |