vibe.d beta banner
get vibe.d
0.7.31

Asynchronous I/O that doesn’t get in your way, written in D

WebSocket.send - multiple declarations

Function WebSocket.send

Sends a text message.

void send (
  scope const(char)[] data
);

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

Throws

WebSocketException if the connection is closed.

Function WebSocket.send

Sends a binary message.

void send (
  ubyte[] data
);

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

Throws

WebSocketException if the connection is closed.

Function WebSocket.send

Sends a message using an output stream.

void send (
  scope void delegate(scope OutgoingWebSocketMessage) sender,
  FrameOpcode frameOpcode = cast(FrameOpcode)1u
);

Throws

WebSocketException if the connection is closed.

Authors

Jan Krüger

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.