Interface WebSocketConnection


@JsType(isNative=true, name="ng.WebSocketConnection", namespace="<global>") public interface WebSocketConnection
Managed WebSocket connection returned by $websocket.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the WebSocket connection and stop reconnect attempts.
    void
    Manually restart the WebSocket connection.
    void
    send(Object data)
    Send a JSON-serialized message through the native WebSocket.
  • Method Details

    • close

      void close()
      Close the WebSocket connection and stop reconnect attempts.
    • reconnect

      void reconnect()
      Manually restart the WebSocket connection.
    • send

      void send(Object data)
      Send a JSON-serialized message through the native WebSocket.
      Parameters:
      data - Value supplied for the data parameter.