WebStreamClient

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstancenot creatablecomingWeb

Up and coming

Hold a live two-way connection to another program, and get it back by itself after a close.

HttpService:CreateWebStreamClientAsync(url, headers) returns once connected and gives one, a websocket named like the object Roblox's HttpService:CreateWebStreamClient gives, a child of HttpService. Send is queued and never waits. With AutoReconnect on, it tries again every 5 s after a close.

Properties

NameTypeDefaultDescription
Urlstring
ConnectionState"Open" | "Closed"
AutoReconnectbooleanWhen true it tries again every 5 s after a close; false by default.

Methods

NameArgumentsReturnsDescription
Send(text: string)()Sends the text, queued; never waits.
Close()()

Events

NamePassesDescription
MessageReceived(string)
Opened()Fires after each reconnect.
Closed(number?)Fires with the close code when the connection closes.
Error(string)
From ShotInstance 33