vibe.d beta banner
get vibe.d
0.10.0

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

Function WebSocket.receiveText

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

string receiveText (
  bool strict = true
) scope scope @safe;

Parameters

NameDescription
strict 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

Authors

Jan Krüger

Copyright

© 2012-2014 Sönke Ludwig

License

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