WebStreamClient
Maintains a streaming connection.
| Memory category | Instances |
|---|
Member index 7
| History | Member | |
|---|---|---|
| 731 | ConnectionState: WebStreamClientState | |
| 686 | Close(): null | |
| 696 | Send(data: string): null | |
| 686 | Closed() | |
| 686 | Error(responseStatusCode: int, errorMessage: string) | |
| 686 | MessageReceived(message: string) | |
| 686 | Opened(responseStatusCode: int, headers: string) | |
| inherited from Object | ||
| 731 | ClassName: string | |
| 731 | className: string | |
| 647 | GetPropertyChangedSignal(property: string): RBXScriptSignal | |
| 647 | IsA(className: string): bool | |
| 731 | isA(className: string): bool | |
| 647 | Changed(property: string) | |
Description
Maintains a streaming connection. To process stream events as they arrive, connect callback functions to each event using RBXScriptSignal:Connect().
History 10
- 731 Change Default of ConnectionState from to
- 726 Change Default of ConnectionState from to
- 696 Add Send
- 686 Add Opened
- 686 Add MessageReceived
- 686 Add Error
- 686 Add Closed
- 686 Add Close
- 686 Add ConnectionState
- 686 Add WebStreamClient
Members 7
Close
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| null | ||
Closes the client, aborting the ongoing request. If successful, fires the WebStreamClient.Closed event.
| Thread safety | Unsafe |
|---|
Closed
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
Fires when the server closes the connection succesfully or the user calls WebStreamClient:Close()
| Thread safety | Unsafe |
|---|
ConnectionState
| Type | Default | |
|---|---|---|
| WebStreamClientState | ||
The current WebStreamClientState of the client.
| Thread safety | ReadSafe |
|---|---|
| Category | Data |
| Loaded/Saved | false/true |
History 3
- 731 Change Default of ConnectionState from to
- 726 Change Default of ConnectionState from to
- 686 Add ConnectionState
Error
| Parameters (2) | |
|---|---|
| responseStatusCode | int |
| errorMessage | string |
Fires if an error is received while establishing the connection or during the connection lifetime.
| Thread safety | Unsafe |
|---|
MessageReceived
| Parameters (1) |
|---|
Fires each time a message is received from the server. The format differs based on the WebStreamClientType.
| Thread safety | Unsafe |
|---|
History 1
- 686 Add MessageReceived
Opened
| Parameters (2) | |
|---|---|
| responseStatusCode | int |
| headers | string |
Fires when the a connection is successfully established between the client and server, allowing for events to begin streaming. Provides any response headers in raw format, which can be used for validation.
| Thread safety | Unsafe |
|---|
Send
| Parameters (1) | ||
|---|---|---|
| data | string | |
| Returns (1) | ||
| null | ||
Enqueues data to be transmitted to the server over the connection. Only works on clients created with WebStreamClientType.WebSocket. For other client types it does nothing.
| Thread safety | Unsafe |
|---|