Interface Socket

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

Properties

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

Methods

  • Parameters

    • Optional reason: number

    Returns void

  • Parameters

    • data: any

    Returns void