Interface WebSocket

    • Method Detail

      • request

        RecordedRequest request()
        Returns the original request that initiated this web socket.
      • send

        boolean send​(String text)
        Attempts to enqueue text to be UTF-8 encoded and sent as the data of a text (type 0x1) message.
      • send

        boolean send​(byte[] bytes)
        Attempts to enqueue bytes to be sent as a the data of a binary (type 0x2) message.
      • close

        boolean close​(int code,
                      String reason)
        Attempts to initiate a graceful shutdown of this web socket.

        No more messages can be sent.

        Parameters:
        code - the status code.
        reason - reason of closure.