WebSocket
The WebSocket library provides functions for creating WebSocket connections for real-time bidirectional communication.
Overview
WebSockets allow you to:
- Establish persistent connections to servers
- Send and receive messages in real-time
Constructor
| Function | Description |
|---|---|
WebSocket.connect | Create a new WebSocket connection |
Properties
| Property | Type | Description |
|---|---|---|
OnMessage | Signal | Fired when a message is received |
OnClose | Signal | Fired when the connection closes |
Methods
| Method | Description |
|---|---|
WebSocket:Send | Send a string message |
WebSocket:Close | Close the connection |