WebSocket.send

Sends a text message.

On the JavaScript side, the text will be available as message.data (type string).

  1. void send(const(char)[] data)
    class WebSocket
    @safe scope
    void
    send
    (
    scope const(char)[] data
    )
  2. void send(ubyte[] data)
  3. void send(void delegate(scope OutgoingWebSocketMessage) @(safe) sender, FrameOpcode frameOpcode)

Throws

A WebSocketException is thrown if the connection gets closed before or during the transfer of the message.

Meta