sseAdapter
import { sseAdapter } from "@hyper-fetch/sockets"
Description
Defined in adapter/adapter.sse.ts:13
Preview
sseAdapter(socket, DO_NOT_USE)
Parameters
Name | Details |
---|---|
socket
|
|
DO_NOT_USE
|
|
Returns
{
connect: () => void;
connecting: boolean;
disconnect: () => void;
emit: (eventMessageId: string, emitter: EmitterInstance, ack?: EmitterAcknowledgeType<any, SocketAdapterType<SSEAdapterOptionsType, MessageEvent<SocketData<any>>, never, never>>) => void;
listen: (listener: Listener<any, any, SocketAdapterType<SSEAdapterOptionsType, MessageEvent<SocketData<any>>, never, never>, false>, callback: ListenerCallbackType<SocketAdapterType<SSEAdapterOptionsType, MessageEvent<SocketData<any>>, never, never>, any>) => RemoveListenerCallbackType;
listeners: Map<string, Map<ListenerCallbackType<SocketAdapterInstance, any>, VoidFunction>>;
open: boolean;
reconnect: () => void;
reconnectionAttempts: number;
removeListener: (endpoint: string, callback: (...args: any) => void) => void;
}