Reference API Roblox

Engine API

Website

Related

Reference API Roblox

WebStreamClient

Maintains a streaming connection.

This class is not replicated. Its interface does not cross the network boundary.
This class is not creatable. Instances of this class cannot be created with Instance.new.
Tags: [NotCreatable, NotReplicated]

Member index 6

HistoryMember
686ConnectionState: WebStreamClientState
686Close(): null
686Closed()
686Error(responseStatusCode: int, errorMessage: string)
686MessageReceived(message: string)
686Opened(responseStatusCode: int, headers: string)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

Maintains a streaming connection. To process stream events as they arrive, connect callback functions to each event using RBXScriptSignal:Connect().

History 7

Members 6

Close

Parameters (0)
No parameters.
Returns (1)
null

Closes the client, aborting the ongoing request. If successful, fires the WebStreamClient.Closed event.

History 1

Closed

Parameters (0)
No parameters.

Fires when the server closes the connection succesfully or the user calls WebStreamClient:Close()

History 1

ConnectionState

TypeDefault
WebStreamClientState

The current WebStreamClientState of the client.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 1

Tags: [ReadOnly, NotReplicated]

Error

Parameters (2)
responseStatusCodeint
errorMessagestring

Fires if an error is received while establishing the connection or during the connection lifetime.

History 1

MessageReceived

Parameters (1)
messagestring

Fires each time a message is received from the server. The format differs based on the WebStreamClientType.

History 1

Opened

Parameters (2)
responseStatusCodeint
headersstring

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.

History 1

Settings