Package playn.core

Interface Net.WebSocket

Enclosing class:
Net

public static interface Net.WebSocket
Encapsulates a web socket.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Notifies game of web socket events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Requests that this web socket be closed.
    void
    send(String data)
    Queues the supplied text message to be sent over the socket.
    void
    Queues the supplied binary message to be sent over the socket.
  • Method Details

    • close

      void close()
      Requests that this web socket be closed. This will result in a call to Net.WebSocket.Listener.onClose() when the socket closure is completed.
    • send

      void send(String data)
      Queues the supplied text message to be sent over the socket.
    • send

      void send(ByteBuffer data)
      Queues the supplied binary message to be sent over the socket.