setconnectionenabled
Enables or disables an existing connection.
Syntax
setconnectionenabled(connection: Connection, enabled: boolean) -> ()
Also available as
set_connection_enabled
Parameters
| Parameter | Type | Description |
|---|---|---|
connection | Connection | Connection to change. |
enabled | boolean | Requested enabled state. |
Description
This calls the corresponding Enable or Disable operation; it does not replace the callback. A disconnected connection is not revived by setting enabled to true.
Example
local function pause(connection)
setconnectionenabled(connection, false)
end
These are Game executor contracts. Check build requirements and session lifetimes before using them.
