Package playn.core

Interface Net.WebSocket.Listener

Enclosing interface:
Net.WebSocket

public static interface Net.WebSocket.Listener
Notifies game of web socket events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Reports that a web socket has been closed.
    void
    Reports that a binary message has arrived on a web socket.
    void
    onError(String reason)
    Reports that a web socket has encountered an error.
    void
    Reports that a requested web socket is now open and ready for use.
    void
    Reports that a text message has arrived on a web socket.
  • Method Details

    • onOpen

      void onOpen()
      Reports that a requested web socket is now open and ready for use.
    • onTextMessage

      void onTextMessage(String msg)
      Reports that a text message has arrived on a web socket.
    • onDataMessage

      void onDataMessage(ByteBuffer msg)
      Reports that a binary message has arrived on a web socket.
    • onClose

      void onClose()
      Reports that a web socket has been closed.
    • onError

      void onError(String reason)
      Reports that a web socket has encountered an error. TODO: is it closed as a result of this?