import { RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared/websockets/RTCodec';
export type UseWebsocketProps<T> = {
    isBinary?: boolean;
    url: string;
    protocols?: string[];
    processMessage: ((data: T) => void) | null;
    initMessage?: {
        type: RTEvent.INIT;
        payload: undefined;
    };
    retryReconnect?: number;
    connectMode?: 'auto' | 'manual';
};
declare const useWebsocket: <T = unknown>({ isBinary, url, protocols, processMessage, initMessage, retryReconnect, connectMode }: UseWebsocketProps<T>) => {
    ws: WebSocket | undefined;
    push: (data: RTMessageManagedClient) => void;
    close: (closeCode?: number) => void;
    connect: () => WebSocket | undefined;
};
export default useWebsocket;
