Interface WxMessageController

Source
Expand description

Controller for the lowest level of message passing using MessageEvents. This is used internally by WxEnd

interface WxMessageController {
    close: () => void;
    isClosed: () => boolean;
    onClose: (callback: () => void) => () => void;
    start: () => Promise<WxVoid>;
}

Properties§

§close: { ... }

Mark the channel as closed and unregisters all message handlers registered by the end. If handshake is still in progress, it will be aborted.

§isClosed: { ... }

Check if the end is closed

§onClose: { ... }

Add a subscriber to the close event. The subscriber will be called when the end is closed at most once

§start: { ... }

Start the handshake process.