import { Observable } from '@nativescript/core';
import { ServerStatus } from './common';
export declare class Server {
    private server;
    constructor(config: {
        logger?: boolean;
        path: string;
        directory: string;
        index?: string;
        hostName?: string;
        port: number;
        workers?: number;
        showFiles?: boolean;
    });
    get status(): ServerStatus;
    setStatusChangeListener(value: (status: ServerStatus) => void): void;
    start(): Promise<void>;
    stop(wait?: boolean): Promise<void>;
}
export declare class Client {
    _id: number;
    get id(): number;
}
export declare class WebSocketServer extends Observable {
    private server;
    private clients;
    constructor(config: {
        logger: boolean;
        path: string;
        maxPayload?: number;
        hostName: string;
        port: number;
        workers: number;
        autoPong?: boolean;
    });
    get status(): ServerStatus;
    broadcast(data: string | ArrayBuffer | Uint8Array | Uint8ClampedArray): void;
    send(id: number, data: string | ArrayBuffer | Uint8Array | Uint8ClampedArray): void;
    ping(id: number, data?: ArrayBuffer | Uint8Array | Uint8ClampedArray | null): void;
    pong(id: number, data?: ArrayBuffer | Uint8Array | Uint8ClampedArray | null): void;
    setStatusChangeListener(value: (status: ServerStatus) => void): void;
    start(): Promise<void>;
    stop(wait?: boolean): Promise<void>;
}
