CreateWebSocketClient()

edit

Creates a websocket client.

Requires Extension: WebSockets Client Extension

CreateWebSocketClient( endpoint=string, component=component );

Returns: any

Argument Description
endpoint
string, required
edit

Endpoint to the websocket (Example: ws://localhost:8080/whatever/)

Alias: url

component
component, required
edit

Component with the callback listener functions.

Callback Arguments Description
onMessage message Text message received
onBinaryMessage binary Binary data received
onClose (none) Connection closed
onError type, cause, [data] Error occurred
onPing (none) Ping frame received
onPong (none) Pong frame received

Alias: cfc, listener

Examples

There are currently no examples for this function 27,924ms WARN No examples for function CreateWebSocketClient

See also