Back to product page

WebSocketReceiveText method

Receives text from WebSocket.




  • Basic
object.WebSocketReceiveText (Count)
The WebSocketReceiveText(object,Count) syntax has these parts:
objectAn expression evaluating to an object of type WebUser
CountLong value. Determines number of bytes to receive. You can use 0 for all available bytes (default value).
Return valueReceived data provided as String value.


This method allows you to read data previously arrived through the websocket. While data was arriving, WebSocketData event fired (more than once, perhaps), and you can allow wodWebServer to buffer the data as it comes. When you're ready to consume it, call this method.

Best moment to use this method is when WebSocketData event has FrameSize argument set to frame size - at which point you know frame is complete and you should read it and process in some way.

To send data back to websocket, use WebSocketSendText method.