Interface Socket

interface Socket {
    onclose: Object;
    onerror: Object;
    onmessage: Object;
    onopen: Object;
    readyState: number;
    close(reason?: number): void;
    send(data: any): void;
}

Properties

onclose: Object
onerror: Object
onmessage: Object
onopen: Object
readyState: number

Methods

  • Parameters

    • Optionalreason: number

    Returns void

  • Parameters

    • data: any

    Returns void