WebSocket.receiveBinary

Receives a new message and returns its contents as a newly allocated data array.

  1. ubyte[] receiveBinary(bool strict)
    class WebSocket
    @safe
    ubyte[]
    receiveBinary
    (
    bool strict = true
    )
  2. string receiveText(bool strict)

Parameters

strict bool

If set, ensures the exact frame type (text/binary) is received and throws an execption otherwise.

Throws

WebSocketException if the connection is closed or if strict == true and the frame received is not the right type

Meta