Skip to main content
Module

x/async_call_rpc/src/types.ts>EventBasedChannel

A lightweight JSON RPC client & server
Latest
interface EventBasedChannel
import { type EventBasedChannel } from "https://deno.land/x/async_call_rpc@v4.0.0/src/types.ts";

This interface represents a "on message"-"send response" model.

Type Parameters

optional
Data = unknown

Methods

on(listener: (data: Data) => void): void | (() => void)

Register the message listener.

send(data: Data): void

Send the data to the remote side.