Class
WebStreamClient
Maintains a streaming connection.
About WebStreamClient
Maintains a streaming connection. To process stream events as they arrive,
connect callback functions to each event using
RBXScriptSignal.Connect.
Properties 1
ConnectionState
: WebStreamClientStateReadOnlyNotReplicatedThe currentWebStreamClientStateof the client.
Methods 2
Close
() → ()Closes the client, aborting the ongoing request.Closes the client, aborting the ongoing request. If successful, fires the
WebStreamClient.Closedevent.Send
(data: string) → ()Enqueues data to be transmitted to the server over the streaming connection.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.
Events 4
Closed
WebStreamClient.Closed:Connect(function())Fires when the streaming connection is closed, either by the server or by a call toWebStreamClient.Close.Fires when the server closes the connection succesfully or the user calls
WebStreamClient.CloseError
WebStreamClient.Error:Connect(function(responseStatusCode, errorMessage))Fires if an error is received while establishing the connection or during the connection lifetime.MessageReceived
WebStreamClient.MessageReceived:Connect(function(message))Fires each time a message is received from the server.Fires each time a message is received from the server. The format differs based on the
WebStreamClientType.Opened
WebStreamClient.Opened:Connect(function(responseStatusCode, headers))Fires when the a connection is successfully established between the client and server, allowing for events to begin streaming.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.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.